summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-04-20 15:36:07 +0300
committerJakub Kicinski <kuba@kernel.org>2023-04-22 06:22:47 +0300
commit461bb5b97049a149278f2c27a3aa12af16da6a2e (patch)
treebb2c8b34c15ed3903cf72fa1a86337e87e7d5f2f /drivers/net/ethernet/freescale/dpaa
parentf9bcdcec3bf0063a010d123a9977cb7a8e240f95 (diff)
downloadlinux-461bb5b97049a149278f2c27a3aa12af16da6a2e.tar.xz
net: dpaa: Fix uninitialized variable in dpaa_stop()
The return value is not initialized on the success path. Fixes: 901bdff2f529 ("net: fman: Change return type of disable to void") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com> Link: https://lore.kernel.org/r/8c9dc377-8495-495f-a4e5-4d2d0ee12f0c@kili.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa')
-rw-r--r--drivers/net/ethernet/freescale/dpaa/dpaa_eth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 9318a2554056..f96196617121 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -299,7 +299,8 @@ static int dpaa_stop(struct net_device *net_dev)
{
struct mac_device *mac_dev;
struct dpaa_priv *priv;
- int i, err, error;
+ int i, error;
+ int err = 0;
priv = netdev_priv(net_dev);
mac_dev = priv->mac_dev;