fbdev: s1d13xxxfb: add missed unregister_framebuffer in remove
Subsystems (2)
PATCH 1/1 fbdev: s1d13xxxfb: add missed unregister_framebuffer in remove
The driver calls register_framebuffer in probe but does not call unregister_framebuffer in remove.
Add the missed call to fix it.
--- drivers/video/fbdev/s1d13xxxfb.c | 1 + 1 file changed, 1 insertion(+)
drivers/video/fbdev/s1d13xxxfb.c +1 -0
@@ -729,6 +729,7 @@ s1d13xxxfb_remove(struct platform_device *pdev)struct s1d13xxxfb_par *par =NULL ;if (info) { +unregister_framebuffer (info); par = info->par;if (par && par->regs) {/* disable output & enable powersave */
Signature · 1 line
2.24.0
Quoted 14 lines · Chuhong Yuan
The driver calls
register_framebufferin probe but does not callunregister_framebufferin remove.
Add the missed call to fix it.Signed-off-by Chuhong Yuan <[email protected]>--- drivers/video/fbdev/s1d13xxxfb.c | 1 + 1 file changed, 1 insertion(+)drivers/video/fbdev/s1d13xxxfb.c +0
-0
drivers/video/fbdev/s1d13xxxfb.c s1d13xxxfb_remove(struct platform_device *pdev) · line 732
Quoted 4 lines
drivers/video/fbdev/s1d13xxxfb.c +1
-0@@ -729,6 +729,7 @@ s1d13xxxfb_remove(struct platform_device *pdev)struct s1d13xxxfb_par *par =NULL ;if (info) { +unregister_framebuffer (info);
s1d13xxxfb_remove() is not only called on removal operation but also by s1d13xxxfb_probe() on register_framebuffer() failure. After above change the code in s1d13xxxfb_probe() will break. The issue needs to be fixed in different way, i.e.
- rename existing s1d13xxxfb_remove() to __s1d13xxxfb_remove()
- add s1d13xxxfb_remove() which does unregister_framebuffer() and then calls __s1d13xxxfb_remove())
drivers/video/fbdev/s1d13xxxfb.c s1d13xxxfb_remove(struct platform_device *pdev) · line 735
Quoted 4 lines
drivers/video/fbdev/s1d13xxxfb.c +0
-0par = info->par;if (par && par->regs) {/* disable output & enable powersave */
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics