diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-11 01:41:23 +0300 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2023-05-31 02:58:42 +0300 |
commit | b816b9444c105b159ffc710579a204b75ed61261 (patch) | |
tree | 18c4c57e852b039df5e6287032f68e9fabd5a276 /drivers/bus | |
parent | ac9a78681b921877518763ba0e89202254349d1b (diff) | |
download | linux-b816b9444c105b159ffc710579a204b75ed61261.tar.xz |
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@pengutronix.de>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> # sanity checks
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Tested-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/fsl-mc/fsl-mc-bus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 653e2d4c116f..410693ff7335 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; } |