Skip to content

Commit b816b94

Browse files
Uwe Kleine-KönigLi Yang
authored andcommitted
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>
1 parent ac9a786 commit b816b94

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/bus/fsl-mc/fsl-mc-bus.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,8 @@ static int fsl_mc_driver_remove(struct device *dev)
457457
int error;
458458

459459
error = mc_drv->remove(mc_dev);
460-
if (error < 0) {
460+
if (error < 0)
461461
dev_err(dev, "%s failed: %d\n", __func__, error);
462-
return error;
463-
}
464462

465463
return 0;
466464
}

0 commit comments

Comments
 (0)