lkml.org 
[lkml]   [2017]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next] net: phy: phylink: Handle NULL fwnode_handle
From
From: Florian Fainelli <f.fainelli@gmail.com>
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 <f.fainelli@gmail.com>

Applied.

\
 
 \ /
  Last update: 2017-12-15 19:51    [W:0.135 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site