From: David Miller Subject: Re: [PATCH net-next] net: phy: phylink: Handle NULL fwnode_handle Date: Fri, 15 Dec 2017 13:51:17 -0500 (EST) Message-ID: <20171215.135117.1425635987050327977.davem@davemloft.net> References: <20171214235758.26122-1-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, rmk+kernel@armlinux.org.uk, andrew@lunn.ch, linux-kernel@vger.kernel.org To: f.fainelli@gmail.com Return-path: In-Reply-To: <20171214235758.26122-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.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.