]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
video: fbdev: w100fb: Reset global state
authorEvgeny Novikov <novikov@ispras.ru>
Wed, 11 Aug 2021 16:58:26 +0000 (19:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:06:38 +0000 (14:06 +0200)
commita478566d6c34f5061f9c8d1df6a5492387aa98f2
tree4bd19167c0e2e3901e798762dd2935001bad66f4
parent6a5226e544ac043bb2d8dc1bfe8920d02282f7cd
video: fbdev: w100fb: Reset global state

[ Upstream commit 8738ddcac644964ae128ccd3d80d48773c8d528e ]

w100fb_probe() did not reset the global state to its initial state. This
can result in invocation of iounmap() even when there was not the
appropriate successful call of ioremap(). For instance, this may be the
case if first probe fails after two successful ioremap() while second
probe fails when first ioremap() fails. The similar issue is with
w100fb_remove(). The patch fixes both bugs.

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

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Co-developed-by: Kirill Shilimanov <kirill.shilimanov@huawei.com>
Signed-off-by: Kirill Shilimanov <kirill.shilimanov@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/w100fb.c