]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: phylink: Don't release NULL GPIO
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 21 May 2018 03:49:47 +0000 (20:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 May 2018 16:13:05 +0000 (12:13 -0400)
commite5050d9d1bbd5f0c0416c15cf345f611ae98b431
tree4a2f0c508abeeaa42e69be09ad685c5cb999a350
parent92ea3f087dd1f5a3b58f62a2007e3770788bbf8e
net: phy: phylink: Don't release NULL GPIO

If CONFIG_GPIOLIB is disabled, gpiod_put() becomes a stub that produces a
warning, this helped identify that we could be attempting to release a NULL
pl->link_gpio GPIO descriptor, so guard against that.

Fixes: e736a106cdab ("net: phy: phylink: Release link GPIO")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c