]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "mdio_bus: Remove unneeded gpiod NULL check"
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 8 Sep 2017 22:38:07 +0000 (15:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Sep 2017 04:12:40 +0000 (21:12 -0700)
commit3856c58e44b50df72d30ca13b83e97627a75ad9a
tree5970aa0631cfc54234919178951142220bb36d24
parent3cfb39ca88e91596f633a9056ab867fa968b89a2
Revert "mdio_bus: Remove unneeded gpiod NULL check"

This reverts commit 52dc99edac9d3dc47fce7b214696bc1626284e2d ("mdio_bus:
Remove unneeded gpiod NULL check"), this commit assumed that GPIOLIB
checks for NULL descriptors, so it's safe to drop them, but it is not
when CONFIG_GPIOLIB is disabled in the kernel. If we do call
gpiod_set_value_cansleep() on a GPIO descriptor we will issue warnings
coming from the inline stubs declared in include/linux/gpio/consumer.h.

Fixes: 52dc99edac9d ("mdio_bus: Remove unneeded gpiod NULL check")
Reported-by: Woojung Huh <Woojung.Huh@microchip.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c