1

soc: fsl: dpio: Suppress duplicated error reporting on device remove

Returning an error code from a fsl_mc_driver's remove callback results
in a generic error message, otherwise the value is ignored and the device
gets unbound.

As the only error path in dpaa2_dpio_remove() already emits an error
message, return zero unconditionally to suppress another (less helpful)
error report.

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>
This commit is contained in:
Uwe Kleine-König 2023-03-10 23:41:27 +01:00 committed by Li Yang
parent b3134039c5
commit c27ea8e632

View File

@ -297,14 +297,10 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)
dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle); dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
fsl_mc_portal_free(dpio_dev->mc_io);
return 0;
err_open: err_open:
fsl_mc_portal_free(dpio_dev->mc_io); fsl_mc_portal_free(dpio_dev->mc_io);
return err; return 0;
} }
static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = { static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = {