media: vpss: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Sat, 23 Mar 2019 02:51:06 +0000 (22:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:14:00 +0000 (09:14 +0200)
commit6fb470ace862bbadb756b178019d496b10fa01cc
tree3fcb06ba225f7ad89b86e6c426717d10bd85ed02
parent70da38e8050920c833826c41f9cc06aa5e43ebdd
media: vpss: fix a potential NULL pointer dereference

[ Upstream commit e08f0761234def47961d3252eac09ccedfe4c6a0 ]

In case ioremap fails, the fix returns -ENOMEM to avoid NULL
pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/davinci/vpss.c