[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210609174353.298731-1-colin.king@canonical.com>
Date: Wed, 9 Jun 2021 18:43:53 +0100
From: Colin King <colin.king@...onical.com>
To: Vladimir Oltean <olteanv@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] net: dsa: sja1105: Fix assigned yet unused return code rc
From: Colin Ian King <colin.king@...onical.com>
The return code variable rc is being set to return error values in two
places in sja1105_mdiobus_base_tx_register and yet it is not being
returned, the function always returns 0 instead. Fix this by replacing
the return 0 with the return code rc.
Addresses-Coverity: ("Unused value")
Fixes: 5a8f09748ee7 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/sja1105/sja1105_mdio.c b/drivers/net/dsa/sja1105/sja1105_mdio.c
index 8dfd06318b23..08517c70cb48 100644
--- a/drivers/net/dsa/sja1105/sja1105_mdio.c
+++ b/drivers/net/dsa/sja1105/sja1105_mdio.c
@@ -171,7 +171,7 @@ static int sja1105_mdiobus_base_tx_register(struct sja1105_private *priv,
out_put_np:
of_node_put(np);
- return 0;
+ return rc;
}
static void sja1105_mdiobus_base_tx_unregister(struct sja1105_private *priv)
--
2.31.1
Powered by blists - more mailing lists