]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mockup: fix a return value check
authorBartosz Golaszewski <brgl@bgdev.pl>
Wed, 6 Dec 2017 16:30:02 +0000 (17:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 8 Dec 2017 14:34:15 +0000 (15:34 +0100)
commit0953da24ace75af7d34d5191032c326ab0fd459d
tree29f240077dea86440bda9fc455e047c6b2805bd2
parent0b218e3ae3c4ac9fd34217d5febe074e189b9df4
gpio: mockup: fix a return value check

The return value of platform_device_register_resndata() on error is
an error code converted to pointer with ERR_PTR(), not NULL.

Check the return value correctly.

Fixes: 6a89252e9800 ("gpio: mockup: rework device probing")
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mockup.c