diff options
author | 2023-07-10 09:19:39 +0200 | |
---|---|---|
committer | 2023-07-11 20:24:32 -0700 | |
commit | 1e679b957ae244cd839b8792b589ea5a671482e8 (patch) | |
tree | bc99aa79eb2988598b7a57c5b46c9299503c7ffa /drivers/net/ethernet/freescale | |
parent | netlink: Make use of __assign_bit() API (diff) | |
download | linux-1e679b957ae244cd839b8792b589ea5a671482e8.tar.gz linux-1e679b957ae244cd839b8792b589ea5a671482e8.tar.bz2 linux-1e679b957ae244cd839b8792b589ea5a671482e8.zip |
net: dpaa: Improve error reporting
Instead of the generic error message emitted by the driver core when a
remove callback returns an error code ("remove callback returned a
non-zero value. This will be ignored."), emit a message describing the
actual problem and return zero to suppress the generic message.
Note that apart from suppressing the generic error message there are no
side effects by changing the return value to zero. This prepares
changing the remove callback to return void.
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230710071946.3470249-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 431f8917dc39..e0e5bf0587fc 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -3516,6 +3516,9 @@ static int dpaa_remove(struct platform_device *pdev) phylink_destroy(priv->mac_dev->phylink); err = dpaa_fq_free(dev, &priv->dpaa_fq_list); + if (err) + dev_err(dev, "Failed to free FQs on remove (%pE)\n", + ERR_PTR(err)); qman_delete_cgr_safe(&priv->ingress_cgr); qman_release_cgrid(priv->ingress_cgr.cgrid); @@ -3528,7 +3531,7 @@ static int dpaa_remove(struct platform_device *pdev) free_netdev(net_dev); - return err; + return 0; } static const struct platform_device_id dpaa_devtype[] = { |