bus: fsl-mc: fsl-mc-allocator: Improve error reporting
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 10 Mar 2023 22:41:26 +0000 (23:41 +0100)
committerLi Yang <leoyang.li@nxp.com>
Tue, 30 May 2023 23:58:42 +0000 (18:58 -0500)
commitb3134039c5b3cf879841e3ec84c8cbf7675554ec
treec8ad673d5773a6cfd01c303a42b386c36404243b
parente0ac89361cfb45d7c84de81563367745d2056f16
bus: fsl-mc: fsl-mc-allocator: Improve error reporting

Instead of silently returning an error in the remove callback (which yields
a generic and little informing error message), annotate each error path of
fsl_mc_resource_pool_remove_device() with an error message and return zero
in the remove callback to suppress the error message.

Note that changing the return value has no other effect than suppressing
the error message by the fsl_mc bus driver.

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>
drivers/bus/fsl-mc/fsl-mc-allocator.c