mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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>
This commit is contained in:
parent
bdf4b8811f
commit
5e6731c88b
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
dcon_device = platform_device_alloc("dcon", -1);
|
||||||
|
|
||||||
if (dcon_device == NULL) {
|
if (!dcon_device) {
|
||||||
pr_err("Unable to create the DCON device\n");
|
pr_err("Unable to create the DCON device\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto eirq;
|
goto eirq;
|
||||||
|
@ -679,7 +679,7 @@ static int dcon_remove(struct i2c_client *client)
|
||||||
|
|
||||||
backlight_device_unregister(dcon->bl_dev);
|
backlight_device_unregister(dcon->bl_dev);
|
||||||
|
|
||||||
if (dcon_device != NULL)
|
if (dcon_device)
|
||||||
platform_device_unregister(dcon_device);
|
platform_device_unregister(dcon_device);
|
||||||
cancel_work_sync(&dcon->switch_source);
|
cancel_work_sync(&dcon->switch_source);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue