lkml.org 
[lkml]   [2023]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] soc: fsl: dpio: Suppress duplicated error reporting on device remove
Date
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>
---
drivers/soc/fsl/dpio/dpio-driver.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index 74eace3109a1..09df5302d255 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -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);

- fsl_mc_portal_free(dpio_dev->mc_io);
-
- return 0;
-
err_open:
fsl_mc_portal_free(dpio_dev->mc_io);

- return err;
+ return 0;
}

static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = {
--
2.39.1
\
 
 \ /
  Last update: 2023-03-27 00:54    [W:0.148 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site