video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 13 Dec 2016 08:20:52 +0000 (13:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Aug 2017 01:59:48 +0000 (18:59 -0700)
commita417ea5b9d22dc5733f6fac5cee72735cb7f8d99
tree19970269da2daeccfeccc02a9a605c5f913c8271
parentddc0ec3be8077a689e0136c873519bf851a741e6
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap

[ Upstream commit 4dcd19bfabaee8f9f4bcf203afba09b98ccbaf76 ]

Here, If devm_ioremap will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference.
This error check will avoid NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/cobalt_lcdfb.c