aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorKejian Yan <[email protected]>2016-03-24 11:08:05 +0000
committerDavid S. Miller <[email protected]>2016-03-24 18:33:07 +0000
commitdaa8cfd9da728b9e35c49311b23127a8859a5f3b (patch)
tree4f611b7b9d89c71ee3b7ee527453fd9089c8ad73 /net/switchdev/switchdev.c
parentnet: hns: optimizate irq proccess for HNS V2 (diff)
downloadkernel-daa8cfd9da728b9e35c49311b23127a8859a5f3b.tar.gz
kernel-daa8cfd9da728b9e35c49311b23127a8859a5f3b.zip
net: hns: fix warning of passing zero to 'PTR_ERR'
There is a misuse of PTR as shown below: ae_node = (void *)of_parse_phandle(dev->of_node, "ae-handle", 0); if (IS_ERR_OR_NULL(ae_node)) { ret = PTR_ERR(ae_node); dev_err(dev, "not find ae-handle\n"); goto out_read_prop_fail; } if the ae_node is NULL, PTR_ERR(ae_node) means it returns success. And the return value should be -ENODEV. Signed-off-by: Kejian Yan <[email protected]> Signed-off-by: Yisen Zhuang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions