]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
stmmac: dwmac-socfpga: fix wrong pointer passed to PTR_ERR()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 12 Jul 2016 11:00:09 +0000 (11:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jul 2016 18:07:38 +0000 (11:07 -0700)
PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

index 4bee2f934a73119ebd0898d98d9eaeee955c27bc..3bc1fa2c1001e78ac3042dbe418fe13f0c9bbd1d 100644 (file)
@@ -214,7 +214,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
                                dev_err(dev,
                                        "%s: ERROR: failed mapping tse control port\n",
                                        __func__);
-                               return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
+                               return PTR_ERR(dwmac->pcs.tse_pcs_base);
                        }
                }
        }