> -----Original Message----- > From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Sent: 20 April 2023 15:36 > To: Sean Anderson <sean.anderson@xxxxxxxx> > Cc: Madalin Bucur <madalin.bucur@xxxxxxx>; David S. Miller > <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski > <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Camelia Alexandra > Groza <camelia.groza@xxxxxxx>; netdev@xxxxxxxxxxxxxxx; kernel- > janitors@xxxxxxxxxxxxxxx > Subject: [PATCH net] 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@xxxxxxxxxx> > --- > Applies to net. > > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > 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; > -- > 2.39.2 Acked-by: Madalin Bucur <madalin.bucur@xxxxxxxxxxx> Thank you!