diff options
author | Pan Bian <bianpan2016@163.com> | 2017-10-30 16:50:01 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-01 12:17:44 +0900 |
commit | d2083d0e92117598dd24ba270af12376f1fb8866 (patch) | |
tree | 9c4ad398f11b477dbf1d222a965201d3f23f0c11 /net/ife | |
parent | 7db8874abd9a134821881bb99301b3afbbe9b080 (diff) | |
download | linux-d2083d0e92117598dd24ba270af12376f1fb8866.tar.gz linux-d2083d0e92117598dd24ba270af12376f1fb8866.tar.bz2 linux-d2083d0e92117598dd24ba270af12376f1fb8866.zip |
net: hns: set correct return value
The function of_parse_phandle() returns a NULL pointer if it cannot
resolve a phandle property to a device_node pointer. In function
hns_nic_dev_probe(), its return value is passed to PTR_ERR to extract
the error code. However, in this case, the extracted error code will
always be zero, which is unexpected.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ife')
0 files changed, 0 insertions, 0 deletions