Skip to content

Commit bddae3e

Browse files
Uwe Kleine-Königmathieupoirier
authored andcommitted
remoteproc: k3-dsp: Suppress duplicate error message in .remove()
When the remove callback returns non-zero, the driver core emits an error message about the error value being ignored. As the driver already emits an error message already, return zero. This has no effect apart from suppressing the core's message. The platform device gets unbound irrespective of the return value. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231123211657.518181-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent cae0e61 commit bddae3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/remoteproc/ti_k3_dsp_remoteproc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,9 @@ static int k3_dsp_rproc_remove(struct platform_device *pdev)
835835
if (rproc->state == RPROC_ATTACHED) {
836836
ret = rproc_detach(rproc);
837837
if (ret) {
838+
/* Note this error path leaks resources */
838839
dev_err(dev, "failed to detach proc, ret = %d\n", ret);
839-
return ret;
840+
return 0;
840841
}
841842
}
842843

0 commit comments

Comments
 (0)