Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-09 Thread Alexey Brodkin
Hi Sergei, On Tue, 2015-09-08 at 22:53 +0300, Sergei Shtylyov wrote: > Hello. > > On 09/08/2015 03:46 PM, Alexey Brodkin wrote: > > > > > Current check of phydev with IS_ERR(phydev) may make not much sense > > > > because of_phy_connect() returns NULL on failure instead of error value. > > > >

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-09 Thread Alexey Brodkin
Hi Sergei, On Tue, 2015-09-08 at 22:53 +0300, Sergei Shtylyov wrote: > Hello. > > On 09/08/2015 03:46 PM, Alexey Brodkin wrote: > > > > > Current check of phydev with IS_ERR(phydev) may make not much sense > > > > because of_phy_connect() returns NULL on failure instead of error value. > > > >

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Sergei Shtylyov
Hello. On 09/08/2015 03:46 PM, Alexey Brodkin wrote: Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Alexey Brodkin
Hi Sergei, On Tue, 2015-09-08 at 14:20 +0300, Sergei Shtylyov wrote: > Hello. > > On 9/8/2015 11:43 AM, Alexey Brodkin wrote: > > > Current check of phydev with IS_ERR(phydev) may make not much sense > > because of_phy_connect() returns NULL on failure instead of error value. > > > > Still for

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Sergei Shtylyov
Hello. On 9/8/2015 11:43 AM, Alexey Brodkin wrote: Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined check

[PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Alexey Brodkin
Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined check IS_ERR_OR_NULL() that covers both cases. Cc: Sergei

[PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Alexey Brodkin
Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined check IS_ERR_OR_NULL() that covers both cases. Cc: Sergei

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Sergei Shtylyov
Hello. On 9/8/2015 11:43 AM, Alexey Brodkin wrote: Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined check

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Alexey Brodkin
Hi Sergei, On Tue, 2015-09-08 at 14:20 +0300, Sergei Shtylyov wrote: > Hello. > > On 9/8/2015 11:43 AM, Alexey Brodkin wrote: > > > Current check of phydev with IS_ERR(phydev) may make not much sense > > because of_phy_connect() returns NULL on failure instead of error value. > > > > Still for

Re: [PATCH v3] stmmac: fix check for phydev being open

2015-09-08 Thread Sergei Shtylyov
Hello. On 09/08/2015 03:46 PM, Alexey Brodkin wrote: Current check of phydev with IS_ERR(phydev) may make not much sense because of_phy_connect() returns NULL on failure instead of error value. Still for checking result of phy_connect() IS_ERR() makes perfect sense. So let's use combined