Merge "pinctrl: Fix the return value for devices without default state"

This commit is contained in:
Linux Build Service Account 2014-02-11 20:09:25 -08:00 committed by Gerrit - the friendly Code Review server
commit 115d826f59
1 changed files with 6 additions and 1 deletions

View File

@ -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);