fbdev: s1d13xxxfb: add missed unregister_framebuffer in remove
The driver calls register_framebuffer() in probe but does not call unregister_framebuffer() in remove. Rename current remove to __s1d13xxxfb_remove() for error handler. Then add a new remove to call unregister_framebuffer(). Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com> [b.zolnierkie: ported over recent s1d13xxxfb changes] [b.zolnierkie: removed extra newline] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200324132311.21729-1-hslester96@gmail.com
This commit is contained in:
parent
5e4096ef03
commit
8213fb4187
|
@ -721,9 +721,7 @@ static void s1d13xxxfb_fetch_hw_state(struct fb_info *info)
|
||||||
xres, yres, xres_virtual, yres_virtual, is_color, is_dual, is_tft);
|
xres, yres, xres_virtual, yres_virtual, is_color, is_dual, is_tft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __s1d13xxxfb_remove(struct platform_device *pdev)
|
||||||
static int
|
|
||||||
s1d13xxxfb_remove(struct platform_device *pdev)
|
|
||||||
{
|
{
|
||||||
struct fb_info *info = platform_get_drvdata(pdev);
|
struct fb_info *info = platform_get_drvdata(pdev);
|
||||||
struct s1d13xxxfb_par *par = NULL;
|
struct s1d13xxxfb_par *par = NULL;
|
||||||
|
@ -749,6 +747,14 @@ s1d13xxxfb_remove(struct platform_device *pdev)
|
||||||
resource_size(&pdev->resource[0]));
|
resource_size(&pdev->resource[0]));
|
||||||
release_mem_region(pdev->resource[1].start,
|
release_mem_region(pdev->resource[1].start,
|
||||||
resource_size(&pdev->resource[1]));
|
resource_size(&pdev->resource[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int s1d13xxxfb_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct fb_info *info = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
unregister_framebuffer(info);
|
||||||
|
__s1d13xxxfb_remove(pdev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -895,7 +901,7 @@ static int s1d13xxxfb_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
s1d13xxxfb_remove(pdev);
|
__s1d13xxxfb_remove(pdev);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue