From: Helge Deller <deller@gmx.de>
To: "Dongliang Mu" <dzm91@hust.edu.cn>,
"Cai Huoqing" <cai.huoqing@linux.dev>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Sekhar Nori" <nsekhar@ti.com>,
"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fbdev: da8xx-fb: add missing regulator_disable() in fb_probe
Date: Fri, 18 Nov 2022 17:39:06 +0100 [thread overview]
Message-ID: <7fcf8e63-7b17-2817-db57-e046f9e2601f@gmx.de> (raw)
In-Reply-To: <20221118141431.3005015-1-dzm91@hust.edu.cn>
On 11/18/22 15:14, Dongliang Mu wrote:
> The error handling code in fb_probe misses regulator_disable if
> regulator_enable is called successfully. The previous commit only
> adds regulator_disable in the .remove(), forgetting the error
> handling code in the .probe.
>
> Fix this by adding a new error label to call regulator_disable.
>
> Fixes: 611097d5daea("fbdev: da8xx: add support for a regulator")
> Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/da8xx-fb.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> index 11922b009ed7..cd07e401b326 100644
> --- a/drivers/video/fbdev/da8xx-fb.c
> +++ b/drivers/video/fbdev/da8xx-fb.c
> @@ -1431,7 +1431,7 @@ static int fb_probe(struct platform_device *device)
> dev_err(&device->dev,
> "GLCD: kmalloc for frame buffer failed\n");
> ret = -EINVAL;
> - goto err_release_fb;
> + goto err_disable_reg;
> }
>
> da8xx_fb_info->screen_base = (char __iomem *) par->vram_virt;
> @@ -1475,7 +1475,7 @@ static int fb_probe(struct platform_device *device)
>
> ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
> if (ret)
> - goto err_release_fb;
> + goto err_disable_reg;
> da8xx_fb_info->cmap.len = par->palette_sz;
>
> /* initialize var_screeninfo */
> @@ -1529,6 +1529,9 @@ static int fb_probe(struct platform_device *device)
> err_dealloc_cmap:
> fb_dealloc_cmap(&da8xx_fb_info->cmap);
>
> +err_disable_reg:
> + if (par->lcd_supply)
> + regulator_disable(par->lcd_supply);
> err_release_fb:
> framebuffer_release(da8xx_fb_info);
>
prev parent reply other threads:[~2022-11-18 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 14:14 Dongliang Mu
2022-11-18 16:39 ` Helge Deller [this message]
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=7fcf8e63-7b17-2817-db57-e046f9e2601f@gmx.de \
--to=deller@gmx.de \
--cc=b.zolnierkie@samsung.com \
--cc=bgolaszewski@baylibre.com \
--cc=cai.huoqing@linux.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=dzm91@hust.edu.cn \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=u.kleine-koenig@pengutronix.de \
/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®