forked from Minki/linux
rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
When a remove platform device callback returns an error code, the driver core emits an error message ("remove callback returned a non-zero value. This will be ignored.\n") and still removes the device. As the driver already emits a more specific error message, return 0 to suppress the core's error message. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220707153156.214841-1-u.kleine-koenig@pengutronix.de
This commit is contained in:
parent
2a692245b6
commit
5c9f41443e
@ -375,10 +375,8 @@ static int cros_ec_rtc_remove(struct platform_device *pdev)
|
|||||||
ret = blocking_notifier_chain_unregister(
|
ret = blocking_notifier_chain_unregister(
|
||||||
&cros_ec_rtc->cros_ec->event_notifier,
|
&cros_ec_rtc->cros_ec->event_notifier,
|
||||||
&cros_ec_rtc->notifier);
|
&cros_ec_rtc->notifier);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(dev, "failed to unregister notifier\n");
|
dev_err(dev, "failed to unregister notifier\n");
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user