Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35bfbf70 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Bartlomiej Zolnierkiewicz
Browse files

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: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent d9b1fe65
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2079,7 +2079,9 @@ static int sm501fb_remove(struct platform_device *pdev)
	sm501_free_init_fb(info, HEAD_CRT);
	sm501_free_init_fb(info, HEAD_PANEL);

	if (fbinfo_crt)
		unregister_framebuffer(fbinfo_crt);
	if (fbinfo_pnl)
		unregister_framebuffer(fbinfo_pnl);

	sm501fb_stop(info);