video: fbdev: controlfb: fix warnings about comparing pointer to 0
authorShobhit Kukreti <shobhitkukreti@gmail.com>
Fri, 21 Jun 2019 13:13:14 +0000 (15:13 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 21 Jun 2019 13:13:14 +0000 (15:13 +0200)
commitacf7287e77852cf787c45980c27bfbdca7d94b0d
tree77a82c37ffd25c3cb2bf9b251d979d22abd18f2e
parentb6b1d5119297abc881128bb05f4d2611bf28e7a9
video: fbdev: controlfb: fix warnings about comparing pointer to 0

Fix warnings aboout comparing pointer to 0 reported by coccicheck:

drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0

Also while at it change return value to -ENOMEM on kzalloc() failure.

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Reviewed-by: Mathieu Malaterre <malat@debian.org>
[b.zolnierkie: minor fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/controlfb.c