From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932474AbdJ3J3q (ORCPT ); Mon, 30 Oct 2017 05:29:46 -0400 Received: from sym2.noone.org ([178.63.92.236]:54882 "EHLO sym2.noone.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbdJ3J3o (ORCPT ); Mon, 30 Oct 2017 05:29:44 -0400 Date: Mon, 30 Oct 2017 10:29:41 +0100 From: Tobias Klauser To: Pan Bian Cc: Yisen Zhuang , Salil Mehta , "David S. Miller" , lipeng , Lin Yun Sheng , Kejian Yan , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: hns: set correct return value Message-ID: <20171030092937.GH1370@distanz.ch> References: <1509353401-2699-1-git-send-email-bianpan2016@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509353401-2699-1-git-send-email-bianpan2016@163.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. However, in this case, the extracted error code will > always be zero, which is unexpected. > > Signed-off-by: Pan Bian Reviewed-by: Tobias Klauser