]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: sprd: check for allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Sep 2017 07:29:26 +0000 (10:29 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 12 Sep 2017 09:26:40 +0000 (11:26 +0200)
commit8ff9d81863fe4ea3a73b24592a6ccd4b92e9d926
tree5e82a8715fb7d81877734b05834ab458b7e1b457
parent4a3a3a7719d402501a730480f5102a8bd0b89ccd
pinctrl: sprd: check for allocation failure

devm_pinctrl_get() could fail with ERR_PTR(-ENOMEM) so I have added a
check for that.  I also reversed the other IS_ERR() test because it was
a little confusing to test one way and then the opposite a couple lines
later.

Fixes: e8878eb17e9f ("pinctrl: sprd: Add Spreadtrum pin control driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sprd/pinctrl-sprd.c