[patch] of: check for IS_ERR()

David Miller davem at davemloft.net
Fri Feb 26 20:54:20 EST 2010


From: Dan Carpenter <error27 at gmail.com>
Date: Fri, 26 Feb 2010 12:49:41 +0300

> get_phy_device() can return an ERR_PTR()
> 
> Signed-off-by: Dan Carpenter <error27 at gmail.com>
> ---
> I don't have a cross compile environment set up so I can't even compile 
> test this.  :/  But err.h is included so it should be OK.

It should return ERR_PTR() consistently.  Checking for both
NULL and ERR_PTR() is undesirable.


More information about the devicetree-discuss mailing list