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

From: Tobias Klauser
Date: Mon Oct 30 2017 - 05:29:52 EST


On 2017-10-30 at 09:50:01 +0100, Pan Bian <bianpan2016@xxxxxxx> 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. However, in this case, the extracted error code will
> always be zero, which is unexpected.
>
> Signed-off-by: Pan Bian <bianpan2016@xxxxxxx>

Reviewed-by: Tobias Klauser <tklauser@xxxxxxxxxx>