mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
fbdev: uvesafb: unregister connector callback on init failure
uvesafb_init() registers the v86d connector callback before registering
the platform driver. If platform_driver_register() fails, the function
returns the error directly and leaves the connector callback registered.
The later platform-device failure path already unregisters the callback.
Add the same cleanup before the final return when platform-driver
registration fails.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 8bdb3a2d7d ("uvesafb: the driver core")
Cc: stable@vger.kernel.org
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
db2ddb8714
commit
de8db23aa7
|
|
@ -1907,6 +1907,8 @@ static int uvesafb_init(void)
|
|||
err = 0;
|
||||
}
|
||||
}
|
||||
if (err)
|
||||
cn_del_callback(&uvesafb_cn_id);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user