mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
pinctrl: ingenic: checking for NULL instead of IS_ERR()
devm_pinctrl_register() returns error pointers, it doesn't return NULL.
Fixes: b5c23aa465
("pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
1bd303dc04
commit
e7f4c4bf99
1 changed files with 2 additions and 2 deletions
|
@ -785,9 +785,9 @@ int ingenic_pinctrl_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
jzpc->pctl = devm_pinctrl_register(dev, pctl_desc, jzpc);
|
||||
if (!jzpc->pctl) {
|
||||
if (IS_ERR(jzpc->pctl)) {
|
||||
dev_err(dev, "Failed to register pinctrl\n");
|
||||
return -EINVAL;
|
||||
return PTR_ERR(jzpc->pctl);
|
||||
}
|
||||
|
||||
for (i = 0; i < chip_info->num_groups; i++) {
|
||||
|
|
Loading…
Reference in a new issue