Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310812
b: refs/heads/master
c: 0bf7481
h: refs/heads/master
v: v3
  • Loading branch information
Devendra Naga authored and Linus Walleij committed Jun 12, 2012
1 parent b9a80a2 commit 01ae21b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67695f2eae210b0631fb92cf5649d0454953e230
refs/heads/master: 0bf7481852c8ece4888c299ba0259b789c3dbde3
11 changes: 8 additions & 3 deletions trunk/drivers/pinctrl/pinctrl-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev,

/* Compose group name */
group = kzalloc(length, GFP_KERNEL);
if (!group)
return -ENOMEM;
if (!group) {
ret = -ENOMEM;
goto free;
}
snprintf(group, length, "%s.%d", np->name, reg);
new_map[i].data.mux.group = group;
i++;
Expand All @@ -118,7 +120,7 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev,
pconfig = kmemdup(&config, sizeof(config), GFP_KERNEL);
if (!pconfig) {
ret = -ENOMEM;
goto free;
goto free_group;
}

new_map[i].type = PIN_MAP_TYPE_CONFIGS_GROUP;
Expand All @@ -133,6 +135,9 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev,

return 0;

free_group:
if (!purecfg)
free(group);
free:
kfree(new_map);
return ret;
Expand Down

0 comments on commit 01ae21b

Please sign in to comment.