]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional
authorPan Bian <bianpan2016@163.com>
Sun, 12 Nov 2017 15:38:09 +0000 (23:38 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Nov 2017 12:34:57 +0000 (21:34 +0900)
commita4a3a8fd13f8980833d805641e3d77c13bfe14ce
tree7a68728edbe01300bbcffe3205fd4afd1acbe726
parent02f2c1edf7a0d23ba159d8919d914eb1e18f0856
net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

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 <bianpan2016@163.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c