diff mbox series

[net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

Message ID 20190429135650.72794-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() | expand

Commit Message

Yue Haibing April 29, 2019, 1:56 p.m. UTC
Change the call to PTR_ERR to access the value just tested by IS_ERR.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn April 29, 2019, 1:56 p.m. UTC | #1
On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Please could you add a Fixes: tag.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Yue Haibing April 29, 2019, 2:17 p.m. UTC | #2
On 2019/4/29 21:56, Andrew Lunn wrote:
> On Mon, Apr 29, 2019 at 01:56:50PM +0000, YueHaibing wrote:
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Please could you add a Fixes: tag.
> 

Ok, will sendv2, thanks!

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
> 
> .
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index c3cba46fac9d..e37680654a13 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2381,7 +2381,7 @@  static int cpsw_probe(struct platform_device *pdev)
 
 	clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(clk)) {
-		ret = PTR_ERR(mode);
+		ret = PTR_ERR(clk);
 		dev_err(dev, "fck is not found %d\n", ret);
 		return ret;
 	}