Commit c3664d91 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net: dsa: qca8k: check correct variable in qca8k_phy_eth_command()

This is a copy and paste bug.  It was supposed to check "clear_skb"
instead of "write_skb".

Fixes: 2cd54856 ("net: dsa: qca8k: add support for phy read/write with mgmt Ethernet")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df434326
......@@ -1018,7 +1018,7 @@ qca8k_phy_eth_command(struct qca8k_priv *priv, bool read, int phy,
clear_skb = qca8k_alloc_mdio_header(MDIO_WRITE, QCA8K_MDIO_MASTER_CTRL, &clear_val,
QCA8K_ETHERNET_PHY_PRIORITY, sizeof(clear_val));
if (!write_skb) {
if (!clear_skb) {
ret = -ENOMEM;
goto err_clear_skb;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment