diff mbox

[5/5] of_mdio: get_phy_device() doesn't return NULL anymore

Message ID 2718908.IUaySUkXrd@wasted.cogentembedded.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Sergei Shtylyov April 24, 2016, 5:31 p.m. UTC
Now that get_phy_device() no longer returns NULL on error, we don't need
to check for it...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/of/of_mdio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergei Shtylyov April 24, 2016, 5:37 p.m. UTC | #1
On 04/24/2016 08:31 PM, Sergei Shtylyov wrote:

> Now that get_phy_device() no longer returns NULL on error, we don't need
> to check for it...
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>

    Oops, forgot to CC: the DT people, doing that now...

> ---
>   drivers/of/of_mdio.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: net-next/drivers/of/of_mdio.c
> ===================================================================
> --- net-next.orig/drivers/of/of_mdio.c
> +++ net-next/drivers/of/of_mdio.c
> @@ -56,7 +56,7 @@ static void of_mdiobus_register_phy(stru
>   		phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
>   	else
>   		phy = get_phy_device(mdio, addr, is_c45);
> -	if (IS_ERR_OR_NULL(phy))
> +	if (IS_ERR(phy))
>   		return;
>
>   	rc = irq_of_parse_and_map(child, 0);
Florian Fainelli April 25, 2016, 7:47 p.m. UTC | #2
On 24/04/16 10:31, Sergei Shtylyov wrote:
> Now that get_phy_device() no longer returns NULL on error, we don't need
> to check for it...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox

Patch

Index: net-next/drivers/of/of_mdio.c
===================================================================
--- net-next.orig/drivers/of/of_mdio.c
+++ net-next/drivers/of/of_mdio.c
@@ -56,7 +56,7 @@  static void of_mdiobus_register_phy(stru
 		phy = phy_device_create(mdio, addr, phy_id, 0, NULL);
 	else
 		phy = get_phy_device(mdio, addr, is_c45);
-	if (IS_ERR_OR_NULL(phy))
+	if (IS_ERR(phy))
 		return;
 
 	rc = irq_of_parse_and_map(child, 0);