From: Colin King <hidden> Date: 2021-06-09 17:44:00
From: Colin Ian King <redacted>
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 <redacted>
---
drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-06-09 18:00:28
On Wed, Jun 09, 2021 at 06:43:53PM +0100, Colin King wrote:
From: Colin Ian King <redacted>
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 <redacted>
---
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 9 Jun 2021 18:43:53 +0100 you wrote:
From: Colin Ian King <redacted>
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.
[...]
From: Dan Carpenter <hidden> Date: 2021-06-10 06:24:27
On Wed, Jun 09, 2021 at 06:43:53PM +0100, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>
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 <redacted>
---
drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-06-10 17:52:46
On Thu, Jun 10, 2021 at 09:23:58AM +0300, Dan Carpenter wrote:
On Wed, Jun 09, 2021 at 06:43:53PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
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 <redacted>
---
drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -171,7 +171,7 @@ static int sja1105_mdiobus_base_tx_register(struct sja1105_private *priv,out_put_np:of_node_put(np);-return0;+returnrc;
Should this function really return success if of_device_is_available()?
If _not_ of_device_is_available you mean? Yup. Nothing wrong with not
having an internal MDIO bus. This is a driver which supports switches
that do and switches that don't, and even if the node exists, it may
have status = "disabled", which is again fine.
Or am I misunderstanding the question?
From: Dan Carpenter <hidden> Date: 2021-06-10 18:20:05
On Thu, Jun 10, 2021 at 08:51:24PM +0300, Vladimir Oltean wrote:
On Thu, Jun 10, 2021 at 09:23:58AM +0300, Dan Carpenter wrote:
quoted
On Wed, Jun 09, 2021 at 06:43:53PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
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 <redacted>
---
drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -171,7 +171,7 @@ static int sja1105_mdiobus_base_tx_register(struct sja1105_private *priv,out_put_np:of_node_put(np);-return0;+returnrc;
Should this function really return success if of_device_is_available()?
If _not_ of_device_is_available you mean? Yup. Nothing wrong with not
having an internal MDIO bus. This is a driver which supports switches
that do and switches that don't, and even if the node exists, it may
have status = "disabled", which is again fine.
Or am I misunderstanding the question?
Yeah. I left out the "!". That answers the question. Thanks!
regards,
dan carpenter