Commit b816b944 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Li Yang
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> # sanity checks
Reviewed-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Tested-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent ac9a7868
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
}