video: hgafb: fix potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Mon, 1 Apr 2019 15:46:58 +0000 (17:46 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 1 Apr 2019 15:46:58 +0000 (17:46 +0200)
commitec7f6aad57ad29e4e66cc2e18e1e1599ddb02542
tree8edf09c212e2ff769f36d345702bccc4c4ebbc17
parentb0e999c9558194a7b8908c41eaa7903e27fdb8c8
video: hgafb: fix potential NULL pointer dereference

When ioremap fails, hga_vram should not be dereferenced. The fix
check the failure to avoid NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Cc: Aditya Pakki <pakki001@umn.edu>
Cc: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
[b.zolnierkie: minor patch summary fixup]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/hgafb.c