mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Chen Ni <nichen@iscas.ac.cn>,
	u.kleine-koenig@baylibre.com, elfring@users.sourceforge.net
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fbdev: au1100fb: Add missing check for clk_enable
Date: Wed, 28 Jan 2026 14:29:37 +0100	[thread overview]
Message-ID: <9ca6e1cc-7469-450b-a58f-9279412fb9de@gmx.de> (raw)
In-Reply-To: <20260128091004.2747011-1-nichen@iscas.ac.cn>

On 1/28/26 10:10, Chen Ni wrote:
> Add check for the return value of clk_enable() andreturn the error
> if it fails in order to catch the error.

Why?
If it really fails, the screen and everything stay blank,
so it's even worse....
It seems nobody is actually checking the return value, most likely
because if it fails, the system will sleep forever anyway.
Or am I missing something?

For now I reject this patch.

Helge


> 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);


  parent reply	other threads:[~2026-01-28 13:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28  9:10 Chen Ni
2026-01-28  9:40 ` Markus Elfring
2026-01-28 13:29 ` Helge Deller [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ca6e1cc-7469-450b-a58f-9279412fb9de@gmx.de \
    --to=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=elfring@users.sourceforge.net \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®