aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-10-17 21:52:50 +0200
committerHelge Deller <deller@gmx.de>2022-10-18 10:22:28 +0200
commit3c6174f9ffcb63ac8b54809c8043d7800b185bfb (patch)
treeda3cee45e011e48c0ec8a5e93c2deb03ec7f2a0e
parentfbdev: MIPS supports iomem addresses (diff)
downloadlinux-dev-3c6174f9ffcb63ac8b54809c8043d7800b185bfb.tar.xz
linux-dev-3c6174f9ffcb63ac8b54809c8043d7800b185bfb.zip
fbdev: da8xx-fb: Fix error handling in .remove()
Even in the presence of problems (here: regulator_disable() might fail), it's important to unregister all resources acquired during .probe() and disable the device (i.e. DMA activity) because even if .remove() returns an error code, the device is removed and the .remove() callback is never called again later to catch up. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Helge Deller <deller@gmx.de> Fixes: 611097d5daea ("fbdev: da8xx: add support for a regulator")
-rw-r--r--drivers/video/fbdev/da8xx-fb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index ae76a2111c77..11922b009ed7 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1076,7 +1076,8 @@ static int fb_remove(struct platform_device *dev)
if (par->lcd_supply) {
ret = regulator_disable(par->lcd_supply);
if (ret)
- return ret;
+ dev_warn(&dev->dev, "Failed to disable regulator (%pe)\n",
+ ERR_PTR(ret));
}
lcd_disable_raster(DA8XX_FRAME_WAIT);