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>
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;
backlight_device_unregister(dcon->bl_dev);
- if (dcon_device != NULL)
+ if (dcon_device)
platform_device_unregister(dcon_device);
cancel_work_sync(&dcon->switch_source);