]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
video: fbdev: w100fb: Reset global state
authorEvgeny Novikov <novikov@ispras.ru>
Wed, 11 Aug 2021 16:58:26 +0000 (19:58 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:19:22 +0000 (15:19 +0200)
commitecf7335aa247c3291b9f9c6892ec91121013330d
tree40730fb1499934430c6b4657c8d85bc728105b44
parentb423125e51e3d743264f8517c7b32de8a576f0d8
video: fbdev: w100fb: Reset global state

BugLink: https://bugs.launchpad.net/bugs/1971497
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/video/fbdev/w100fb.c