[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230310224128.2638078-2-u.kleine-koenig@pengutronix.de>
Date: Fri, 10 Mar 2023 23:41:23 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Stuart Yoder <stuyoder@...il.com>,
Laurentiu Tudor <laurentiu.tudor@....com>
Cc: kernel@...gutronix.de, linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] bus: fsl-mc: Only warn once about errors on device unbind
If a platform driver's remove function returns an error code, this
results in a (generic and little helpful) error message. Otherwise the
value is ignored.
As fsl_mc_driver_remove() already emit an error message, return 0 also
in the error case. The only effect is to suppress the device core's
error message.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
drivers/bus/fsl-mc/fsl-mc-bus.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 36cb091a33b4..1531e6101fb1 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -457,10 +457,8 @@ static int fsl_mc_driver_remove(struct device *dev)
int error;
error = mc_drv->remove(mc_dev);
- if (error < 0) {
+ if (error < 0)
dev_err(dev, "%s failed: %d\n", __func__, error);
- return error;
- }
return 0;
}
--
2.39.1
Powered by blists - more mailing lists