* [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume
@ 2024-10-11 19:42 Dan Carpenter
2024-10-14 7:06 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2024-10-11 19:42 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Helge Deller, Uwe Kleine-König, Dan Carpenter,
Thomas Zimmermann, Sekhar Nori, Bartlomiej Zolnierkiewicz,
linux-fbdev, dri-devel, linux-kernel, kernel-janitors
Add a missing console_unlock() in the suspend and resume functions on
the error paths.
Fixes: 611097d5daea ("fbdev: da8xx: add support for a regulator")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/video/fbdev/da8xx-fb.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index fad1e13c6332..66ff8456b231 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1610,8 +1610,10 @@ static int fb_suspend(struct device *dev)
console_lock();
if (par->lcd_supply) {
ret = regulator_disable(par->lcd_supply);
- if (ret)
+ if (ret) {
+ console_unlock();
return ret;
+ }
}
fb_set_suspend(info, 1);
@@ -1636,8 +1638,10 @@ static int fb_resume(struct device *dev)
if (par->lcd_supply) {
ret = regulator_enable(par->lcd_supply);
- if (ret)
+ if (ret) {
+ console_unlock();
return ret;
+ }
}
}
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume
2024-10-11 19:42 [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume Dan Carpenter
@ 2024-10-14 7:06 ` Bartosz Golaszewski
2024-10-14 7:16 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-10-14 7:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: Helge Deller, Uwe Kleine-König, Thomas Zimmermann,
Sekhar Nori, Bartlomiej Zolnierkiewicz, linux-fbdev, dri-devel,
linux-kernel, kernel-janitors
On Fri, Oct 11, 2024 at 9:42 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Add a missing console_unlock() in the suspend and resume functions on
> the error paths.
>
> Fixes: 611097d5daea ("fbdev: da8xx: add support for a regulator")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/video/fbdev/da8xx-fb.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> index fad1e13c6332..66ff8456b231 100644
> --- a/drivers/video/fbdev/da8xx-fb.c
> +++ b/drivers/video/fbdev/da8xx-fb.c
> @@ -1610,8 +1610,10 @@ static int fb_suspend(struct device *dev)
> console_lock();
> if (par->lcd_supply) {
> ret = regulator_disable(par->lcd_supply);
> - if (ret)
> + if (ret) {
> + console_unlock();
> return ret;
> + }
> }
>
> fb_set_suspend(info, 1);
> @@ -1636,8 +1638,10 @@ static int fb_resume(struct device *dev)
>
> if (par->lcd_supply) {
> ret = regulator_enable(par->lcd_supply);
> - if (ret)
> + if (ret) {
> + console_unlock();
> return ret;
> + }
> }
> }
>
> --
> 2.45.2
>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume
2024-10-14 7:06 ` Bartosz Golaszewski
@ 2024-10-14 7:16 ` Bartosz Golaszewski
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-10-14 7:16 UTC (permalink / raw)
To: Dan Carpenter
Cc: Helge Deller, Uwe Kleine-König, Thomas Zimmermann,
Sekhar Nori, linux-fbdev, dri-devel, linux-kernel,
kernel-janitors
On Mon, Oct 14, 2024 at 9:06 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Fri, Oct 11, 2024 at 9:42 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > Add a missing console_unlock() in the suspend and resume functions on
> > the error paths.
> >
> > Fixes: 611097d5daea ("fbdev: da8xx: add support for a regulator")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---
> > drivers/video/fbdev/da8xx-fb.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
> > index fad1e13c6332..66ff8456b231 100644
> > --- a/drivers/video/fbdev/da8xx-fb.c
> > +++ b/drivers/video/fbdev/da8xx-fb.c
> > @@ -1610,8 +1610,10 @@ static int fb_suspend(struct device *dev)
> > console_lock();
> > if (par->lcd_supply) {
> > ret = regulator_disable(par->lcd_supply);
> > - if (ret)
> > + if (ret) {
> > + console_unlock();
> > return ret;
> > + }
> > }
> >
> > fb_set_suspend(info, 1);
> > @@ -1636,8 +1638,10 @@ static int fb_resume(struct device *dev)
> >
> > if (par->lcd_supply) {
> > ret = regulator_enable(par->lcd_supply);
> > - if (ret)
> > + if (ret) {
> > + console_unlock();
> > return ret;
> > + }
> > }
> > }
> >
> > --
> > 2.45.2
> >
>
> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
I technically still maintain this platform so I took a second look and
seeing this[1] made me realize that this driver is no longer used on
any board. The platform data structure is not defined anywhere and
there's no OF compatible list.
This patch can be dropped and I'll send one removing this driver from
the kernel.
Bartosz
[1] https://elixir.bootlin.com/linux/v6.11.3/source/drivers/video/fbdev/da8xx-fb.c#L1340
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-14 7:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 19:42 [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume Dan Carpenter
2024-10-14 7:06 ` Bartosz Golaszewski
2024-10-14 7:16 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox