[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <37842441-e372-40e9-b0f5-cf69defc2db5@stanley.mountain>
Date: Fri, 11 Oct 2024 22:42:28 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Helge Deller <deller@....de>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Sekhar Nori <nsekhar@...com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume
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@...aro.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
Powered by blists - more mailing lists