Merge "pinctrl: Fix the return value for devices without default state"
This commit is contained in:
commit
115d826f59
|
@ -199,8 +199,13 @@ int pinctrl_dt_to_map(struct pinctrl *p)
|
|||
propname = kasprintf(GFP_KERNEL, "pinctrl-%d", state);
|
||||
prop = of_find_property(np, propname, &size);
|
||||
kfree(propname);
|
||||
if (!prop)
|
||||
if (!prop) {
|
||||
if (!state) {
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
}
|
||||
list = prop->value;
|
||||
size /= sizeof(*list);
|
||||
|
||||
|
|
Loading…
Reference in New Issue