Re: [PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-14 Thread David Miller
From: Pan Bian Date: Sun, 12 Nov 2017 23:38:09 +0800 > Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its > return value should not be validated by a NULL check. Instead, use IS_ERR. > > Signed-off-by: Pan Bian Applied.

Re: [PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-12 Thread Andrew Lunn
On Mon, Nov 13, 2017 at 12:08:49PM +0800, Phil Reid wrote: > On 12/11/2017 23:38, Pan Bian wrote: > >Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its > >return value should not be validated by a NULL check. Instead, use IS_ERR. > > > >Signed-off-by: Pan Bian > >--- > > driver

Re: [PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-12 Thread Phil Reid
On 12/11/2017 23:38, Pan Bian wrote: Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its return value should not be validated by a NULL check. Instead, use IS_ERR. Signed-off-by: Pan Bian --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-12 Thread Andrew Lunn
On Sun, Nov 12, 2017 at 11:38:09PM +0800, Pan Bian wrote: > Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its > return value should not be validated by a NULL check. Instead, use IS_ERR. > > Signed-off-by: Pan Bian Reviewed-by: Andrew Lunn Andrew

[PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-12 Thread Pan Bian
Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its return value should not be validated by a NULL check. Instead, use IS_ERR. Signed-off-by: Pan Bian --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-