net: dsa: lan9303: check error value from devm_gpiod_get_optional()
authorPhil Reid <preid@electromag.com.au>
Wed, 10 Jan 2018 07:39:33 +0000 (15:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Jan 2018 18:18:02 +0000 (13:18 -0500)
commitf16891326c1c6e6b0f17f60cb6921a145a13e017
treeb96ea4095123b0eb4dd2cee6dcf1dade21473ef9
parenta57d476d9707a470bbdcbd1ab00df73b55650bf7
net: dsa: lan9303: check error value from devm_gpiod_get_optional()

devm_gpiod_get_optional() can return an error in addition to a NULL ptr.
Check for error and propagate that to the probe function. Check return
value in probe. This will now handle EPROBE_DEFER for the reset gpio.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c