]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Fix error return code in gpiolib_dev_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 12 Mar 2021 08:04:23 +0000 (08:04 +0000)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 12 Mar 2021 10:55:20 +0000 (11:55 +0100)
commitcea2f27e18c24058c35e79471c9802f5c066cef9
treea7c487152abb1821da4fce18130a496896484cbc
parent7f63fe50a414877aeaf6ef362c09444e514aad1a
gpiolib: Fix error return code in gpiolib_dev_init()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 95f2c2118753 ("gpiolib: Bind gpio_device to a driver to enable fw_devlink=on by default")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib.c