OSDN Git Service

media: isif: reset global state
authorEvgeny Novikov <novikov@ispras.ru>
Tue, 14 Jul 2020 17:20:49 +0000 (19:20 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:15 +0000 (10:31 +0100)
commit6651dba2bd838f34cf5a1e84229aaa579b1a94fe
tree88aeee3e95705423c3c8e7d687c6dd7645df982b
parentd30ac9d81a33757467eeb8e78606c7748220fb21
media: isif: reset global state

isif_probe() invokes iounmap() on error handling paths, but it does not
reset the global state. So, later it can invoke iounmap() even when
ioremap() fails. This is the case also for isif_remove(). The patch
resets the global state after invoking iounmap() to avoid this.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/davinci/isif.c