omapfb: Fix potential NULL pointer dereference in kmalloc
authorAditya Pakki <pakki001@umn.edu>
Mon, 1 Apr 2019 15:46:57 +0000 (17:46 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 1 Apr 2019 15:46:57 +0000 (17:46 +0200)
commit31fa6e2ae65feed0de10823c5d1eea21a93086c9
treeac5fae2abc5443664c42fb59b3ab8f77272ca6fc
parent17de805aa69e594785592f08ea08c85602432bb9
omapfb: Fix potential NULL pointer dereference in kmalloc

Memory allocated, using kmalloc, for new_compat may fail. This patch
checks for such an error and prevents potential NULL pointer
dereference.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Cc: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c