Skip to content

Commit 5c9f414

Browse files
Uwe Kleine-Königalexandrebelloni
authored andcommitted
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 <[email protected]> Acked-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2a69224 commit 5c9f414

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/rtc/rtc-cros-ec.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,8 @@ static int cros_ec_rtc_remove(struct platform_device *pdev)
375375
ret = blocking_notifier_chain_unregister(
376376
&cros_ec_rtc->cros_ec->event_notifier,
377377
&cros_ec_rtc->notifier);
378-
if (ret) {
378+
if (ret)
379379
dev_err(dev, "failed to unregister notifier\n");
380-
return ret;
381-
}
382380

383381
return 0;
384382
}

0 commit comments

Comments
 (0)