]> git.baikalelectronics.ru Git - kernel.git/commit
leds: leds-gpio: Fix return value check in create_gpio_led()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sat, 6 Feb 2016 14:37:33 +0000 (22:37 +0800)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 14 Mar 2016 08:22:20 +0000 (09:22 +0100)
commit4369cdd5249f6588e690a6380f1b17234ecf3a0e
tree76d06c4421982a56793a5edf97c021b9514243fc
parent9372c5e05863e25055020d4a2b1b620ac3283bd7
leds: leds-gpio: Fix return value check in create_gpio_led()

In case of error, the function gpio_to_desc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-gpio.c