Skip to content

Commit 3c6174f

Browse files
Uwe Kleine-Könighdeller
authored andcommitted
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 <[email protected]> Signed-off-by: Helge Deller <[email protected]> Fixes: 611097d ("fbdev: da8xx: add support for a regulator")
1 parent 25b72d5 commit 3c6174f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/video/fbdev/da8xx-fb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,8 @@ static int fb_remove(struct platform_device *dev)
10761076
if (par->lcd_supply) {
10771077
ret = regulator_disable(par->lcd_supply);
10781078
if (ret)
1079-
return ret;
1079+
dev_warn(&dev->dev, "Failed to disable regulator (%pe)\n",
1080+
ERR_PTR(ret));
10801081
}
10811082

10821083
lcd_disable_raster(DA8XX_FRAME_WAIT);

0 commit comments

Comments
 (0)