diff options
author | Aybuke Ozdemir <aybuke.147@gmail.com> | 2015-10-16 21:51:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 09:06:38 +0300 |
commit | 5e6731c88b2dc2dd484f5b4177df9f3f95c3f6c9 (patch) | |
tree | 8815284d5880fdaaa962c075ed3f5b828d8307bb /drivers/staging | |
parent | bdf4b8811f02067dc332f635b59f600a869da1a0 (diff) | |
download | linux-5e6731c88b2dc2dd484f5b4177df9f3f95c3f6c9.tar.xz |
Staging: olpc_dcon: Remove NULL comparison
Problem found using checkpatch.pl
CHECK: Comparison to NULL could be written "(!)dcon_device"
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/olpc_dcon/olpc_dcon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index 2c34f61e1b39..f45b2ef05f48 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -616,7 +616,7 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id) dcon_device = platform_device_alloc("dcon", -1); - if (dcon_device == NULL) { + if (!dcon_device) { pr_err("Unable to create the DCON device\n"); rc = -ENOMEM; goto eirq; @@ -679,7 +679,7 @@ static int dcon_remove(struct i2c_client *client) backlight_device_unregister(dcon->bl_dev); - if (dcon_device != NULL) + if (dcon_device) platform_device_unregister(dcon_device); cancel_work_sync(&dcon->switch_source); |