mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fbdev: au1100fb: Add missing check for clk_enable
@ 2026-01-28  9:10 Chen Ni
  2026-01-28  9:40 ` Markus Elfring
  2026-01-28 13:29 ` Helge Deller
  0 siblings, 2 replies; 8+ messages in thread
From: Chen Ni @ 2026-01-28  9:10 UTC (permalink / raw)
  To: deller, u.kleine-koenig, elfring
  Cc: linux-fbdev, dri-devel, linux-kernel, Chen Ni

Add check for the return value of clk_enable() andreturn the error
if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/video/fbdev/au1100fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 6251a6b07b3a..5e7a8f018b7b 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-29  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-28  9:10 [PATCH] fbdev: au1100fb: Add missing check for clk_enable Chen Ni
2026-01-28  9:40 ` Markus Elfring
2026-01-28 13:29 ` Helge Deller
2026-01-28 14:55   ` Uwe Kleine-König
2026-01-29  4:07     ` [PATCH v2] fbdev: au1100fb: Check return value of clk_enable() in .resume() Chen Ni
2026-01-29  7:13       ` Uwe Kleine-König
2026-01-29  7:45         ` Helge Deller
2026-01-29  7:36       ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®