提交 ab324d8d 编写于 作者: C Colin Ian King 提交者: David S. Miller

net: dsa: sja1105: Fix assigned yet unused return code rc

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: 5a8f0974 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NVladimir Oltean <olteanv@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4744bf07
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册