Skip to content

Commit 8efcbe9

Browse files
Uwe Kleine-Königdlezcano
authored andcommitted
clocksource/drivers/timer-ti-dm: Improve error message in .remove
If a platform driver's remove callback returns an error code, the driver core emits a generic (and thus little helpful) error message. Instead emit a more specifc error message about the actual error and return zero to suppress the core's message. Note that returning zero has no side effects apart from not emitting said error message. This prepares converting platform driver's remove message to return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230313075430.2730803-4-u.kleine-koenig@pengutronix.de
1 parent ede38f9 commit 8efcbe9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/clocksource/timer-ti-dm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,10 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
11971197

11981198
pm_runtime_disable(&pdev->dev);
11991199

1200-
return ret;
1200+
if (ret)
1201+
dev_err(&pdev->dev, "Unable to determine timer entry in list of drivers on remove\n");
1202+
1203+
return 0;
12011204
}
12021205

12031206
static const struct omap_dm_timer_ops dmtimer_ops = {

0 commit comments

Comments
 (0)