Re: [PATCH] net: hns: set correct return value

2017-10-31 Thread David Miller
From: Pan Bian Date: Mon, 30 Oct 2017 16:50:01 +0800 > 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

Re: [PATCH] net: hns: set correct return value

2017-10-30 Thread Tobias Klauser
On 2017-10-30 at 09:50:01 +0100, Pan Bian wrote: > 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.

[PATCH] net: hns: set correct return value

2017-10-30 Thread Pan Bian
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

Re: net: hns: set correct return value

2017-10-30 Thread Tobias Klauser
On 2017-10-29 at 15:35:32 +0100, Pan Bian wrote: > 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.

net: hns: set correct return value

2017-10-29 Thread Pan Bian
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