Commit 1e679b95 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jakub Kicinski

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: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230710071946.3470249-2-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b8e39b38
...@@ -3516,6 +3516,9 @@ static int dpaa_remove(struct platform_device *pdev) ...@@ -3516,6 +3516,9 @@ static int dpaa_remove(struct platform_device *pdev)
phylink_destroy(priv->mac_dev->phylink); phylink_destroy(priv->mac_dev->phylink);
err = dpaa_fq_free(dev, &priv->dpaa_fq_list); 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_delete_cgr_safe(&priv->ingress_cgr);
qman_release_cgrid(priv->ingress_cgr.cgrid); qman_release_cgrid(priv->ingress_cgr.cgrid);
...@@ -3528,7 +3531,7 @@ static int dpaa_remove(struct platform_device *pdev) ...@@ -3528,7 +3531,7 @@ static int dpaa_remove(struct platform_device *pdev)
free_netdev(net_dev); free_netdev(net_dev);
return err; return 0;
} }
static const struct platform_device_id dpaa_devtype[] = { static const struct platform_device_id dpaa_devtype[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment