From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756143AbdLOSvT (ORCPT ); Fri, 15 Dec 2017 13:51:19 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:54966 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755763AbdLOSvS (ORCPT ); Fri, 15 Dec 2017 13:51:18 -0500 Date: Fri, 15 Dec 2017 13:51:17 -0500 (EST) Message-Id: <20171215.135117.1425635987050327977.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, rmk+kernel@armlinux.org.uk, andrew@lunn.ch, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: phy: phylink: Handle NULL fwnode_handle From: David Miller In-Reply-To: <20171214235758.26122-1-f.fainelli@gmail.com> References: <20171214235758.26122-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 15 Dec 2017 10:51:18 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli Date: Thu, 14 Dec 2017 15:57:58 -0800 > Unlike the various of_* routines to fetch properties, fwnode_* routines can > have an early check against a NULL fwnode_handle reference which makes them > return -EINVAL (see fwnode_call_int_op), thus making it virtually impossible to > differentiate what type of error is going on. > > Have an early check in phylink_register_sfp() so we can keep proceeding with > the initialization, there is not much we can do without a valid fwnode_handle > except return early and treat this similarly to -ENOENT. > > Fixes: 8fa7b9b6af25 ("phylink: convert to fwnode") > Signed-off-by: Florian Fainelli Applied.