34607c223ce49209aa0f5643028852a381d95e60
[openwrt/staging/xback.git] /
1 From c3664d913dc115cab4a5fdb5634df4887048000e Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Fri, 4 Feb 2022 13:03:36 +0300
4 Subject: [PATCH 1/1] net: dsa: qca8k: check correct variable in
5 qca8k_phy_eth_command()
6
7 This is a copy and paste bug. It was supposed to check "clear_skb"
8 instead of "write_skb".
9
10 Fixes: 2cd548566384 ("net: dsa: qca8k: add support for phy read/write with mgmt Ethernet")
11 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
12 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 ---
15 drivers/net/dsa/qca8k.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/net/dsa/qca8k.c
19 +++ b/drivers/net/dsa/qca8k.c
20 @@ -1018,7 +1018,7 @@ qca8k_phy_eth_command(struct qca8k_priv
21
22 clear_skb = qca8k_alloc_mdio_header(MDIO_WRITE, QCA8K_MDIO_MASTER_CTRL, &clear_val,
23 QCA8K_ETHERNET_PHY_PRIORITY, sizeof(clear_val));
24 - if (!write_skb) {
25 + if (!clear_skb) {
26 ret = -ENOMEM;
27 goto err_clear_skb;
28 }