diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-02-04 11:03:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-05 16:07:07 +0100 |
commit | c3664d913dc115cab4a5fdb5634df4887048000e (patch) | |
tree | eb7ba76dddb706b68d368f487e38e908926c3d4b /drivers/net | |
parent | Merge branch 'lan966x-mcast-snooping' (diff) | |
download | linux-c3664d913dc115cab4a5fdb5634df4887048000e.tar.xz linux-c3664d913dc115cab4a5fdb5634df4887048000e.zip |
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: 2cd548566384 ("net: dsa: qca8k: add support for phy read/write with mgmt Ethernet")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/qca8k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 83066af3757f..bb2fbb6826ac 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -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; } |