diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-12-12 17:24:01 +0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-01-22 11:34:17 +0100 |
commit | 7873e98c614aa8dd2c3429aa2e25dc0e9ccadffa (patch) | |
tree | 4eca18c71c18b268f01dc249a978c6cbeff1dd98 /drivers | |
parent | 93171ba6f1deffd82f381d36cb13177872d023f6 (diff) | |
download | linux-7873e98c614aa8dd2c3429aa2e25dc0e9ccadffa.tar.bz2 |
can: flexcan: fix 'passing zero to ERR_PTR()' warning
Fix a static code checker warning:
drivers/net/can/flexcan.c:1435 flexcan_setup_stop_mode() warn: passing zero to 'PTR_ERR'
Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/flexcan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 0f36eafe3ac1..5f097648d12d 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -1432,7 +1432,7 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) gpr_np = of_find_node_by_phandle(phandle); if (!gpr_np) { dev_dbg(&pdev->dev, "could not find gpr node by phandle\n"); - return PTR_ERR(gpr_np); + return -ENODEV; } priv = netdev_priv(dev); |