Commit cbfb9c71 authored by Chen Ni's avatar Chen Ni Committed by Helge Deller
Browse files

fbdev: au1100fb: Check return value of clk_enable() in .resume()



Check the return value of clk_enable() in au1100fb_drv_resume() and
return the error on failure.
This ensures the system is aware of the resume failure and can track
its state accurately.

Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 8e9bf8b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -567,13 +567,16 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
int au1100fb_drv_resume(struct platform_device *dev)
{
	struct au1100fb_device *fbdev = platform_get_drvdata(dev);
	int ret;

	if (!fbdev)
		return 0;

	memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs));

	clk_enable(fbdev->lcdclk);
	ret = clk_enable(fbdev->lcdclk);
	if (ret)
		return ret;

	/* Unblank the LCD */
	au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info);