Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316395
b: refs/heads/master
c: da9aecb
h: refs/heads/master
i:
  316393: a8a1f2a
  316391: 84bec2a
v: v3
  • Loading branch information
Devendra Naga authored and Linus Walleij committed Jul 3, 2012
1 parent 05a9572 commit 073aba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 7e1dfe5319de9ab8c73f3934da4debd0fd88c71c
refs/heads/master: da9aecb02d8763ef17130dfd7c678747ad84b070
17 changes: 6 additions & 11 deletions trunk/drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,9 +1395,9 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
struct pinctrl_dev *pctldev;
int ret;

if (pctldesc == NULL)
if (!pctldesc)
return NULL;
if (pctldesc->name == NULL)
if (!pctldesc->name)
return NULL;

pctldev = kzalloc(sizeof(*pctldev), GFP_KERNEL);
Expand All @@ -1415,23 +1415,20 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
pctldev->dev = dev;

/* check core ops for sanity */
ret = pinctrl_check_ops(pctldev);
if (ret) {
if (pinctrl_check_ops(pctldev)) {
dev_err(dev, "pinctrl ops lacks necessary functions\n");
goto out_err;
}

/* If we're implementing pinmuxing, check the ops for sanity */
if (pctldesc->pmxops) {
ret = pinmux_check_ops(pctldev);
if (ret)
if (pinmux_check_ops(pctldev))
goto out_err;
}

/* If we're implementing pinconfig, check the ops for sanity */
if (pctldesc->confops) {
ret = pinconf_check_ops(pctldev);
if (ret)
if (pinconf_check_ops(pctldev))
goto out_err;
}

Expand All @@ -1457,11 +1454,9 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
if (IS_ERR(s)) {
dev_dbg(dev, "failed to lookup the default state\n");
} else {
ret = pinctrl_select_state_locked(pctldev->p, s);
if (ret) {
if (pinctrl_select_state_locked(pctldev->p, s))
dev_err(dev,
"failed to select default state\n");
}
}
}

Expand Down

0 comments on commit 073aba9

Please sign in to comment.