mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 09:36:52 +07:00
sm501fb: unregister framebuffer only if registered
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device, unregister the framebuffer only if it was registered. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
d9b1fe6516
commit
35bfbf70b2
@ -2079,8 +2079,10 @@ static int sm501fb_remove(struct platform_device *pdev)
|
||||
sm501_free_init_fb(info, HEAD_CRT);
|
||||
sm501_free_init_fb(info, HEAD_PANEL);
|
||||
|
||||
unregister_framebuffer(fbinfo_crt);
|
||||
unregister_framebuffer(fbinfo_pnl);
|
||||
if (fbinfo_crt)
|
||||
unregister_framebuffer(fbinfo_crt);
|
||||
if (fbinfo_pnl)
|
||||
unregister_framebuffer(fbinfo_pnl);
|
||||
|
||||
sm501fb_stop(info);
|
||||
kfree(info);
|
||||
|
Loading…
Reference in New Issue
Block a user