Returning an error value in a platform driver's remove callback results in
a generic error message being emitted by the driver core, but otherwise it
doesn't make a difference. The device goes away anyhow.
As the driver already emits a better error message than the core, suppress
the generic error message by returning zero unconditionally.
---
drivers/char/hw_random/xgene-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/xgene-rng.c b/drivers/char/hw_random/xgene-rng.c
index 31662614a48f..c67d3185b5b6 100644
--- a/drivers/char/hw_random/xgene-rng.c
+++ b/drivers/char/hw_random/xgene-rng.c
@@ -366,7 +366,7 @@ static int xgene_rng_remove(struct platform_device *pdev)
if (rc)
dev_err(&pdev->dev, "RNG init wakeup failed error %d\n", rc);
- return rc;
+ return 0;
}
static const struct of_device_id xgene_rng_of_match[] = {
--
2.39.1
Hello,
On Tue, Feb 14, 2023 at 05:28:29PM +0100, Uwe Kleine-K?nig wrote:
> Returning an error value in a platform driver's remove callback results in
> a generic error message being emitted by the driver core, but otherwise it
> doesn't make a difference. The device goes away anyhow.
>
> As the driver already emits a better error message than the core, suppress
> the generic error message by returning zero unconditionally.
I forgot to add a S-o-b line here. Stephen Rothwell pointed that out for
the applied patch in next.
I don't know how/if Herbert will fix this, but for the Record:
Signed-off-by: Uwe Kleine-K?nig <[email protected]>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |
On Tue, Mar 14, 2023 at 10:04:09AM +0100, Uwe Kleine-K?nig wrote:
>
> I don't know how/if Herbert will fix this, but for the Record:
>
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>
I've fixed it in my tree. Thanks!
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt