mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 05:43:28 -04:00
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: de3578c198 ("can: flexcan: add self wakeup support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
committed by
Marc Kleine-Budde
parent
93171ba6f1
commit
7873e98c61
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user