Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329997
b: refs/heads/master
c: 3f78dec
h: refs/heads/master
i:
  329995: 6fb84e6
v: v3
  • Loading branch information
Graeme Gregory authored and Samuel Ortiz committed Sep 21, 2012
1 parent 86c45d4 commit 3f059df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 81a21cddaf14bd1144c2d173add7cbdeb95a07ca
refs/heads/master: 3f78decc321d48724809406b498708d2ab4b93d2
19 changes: 11 additions & 8 deletions trunk/drivers/mfd/palmas.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
reg = pdata->pad1;
ret = regmap_write(palmas->regmap[slave], addr, reg);
if (ret)
goto err;
goto err_irq;
} else {
ret = regmap_read(palmas->regmap[slave], addr, &reg);
if (ret)
goto err;
goto err_irq;
}

if (!(reg & PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_0))
Expand Down Expand Up @@ -412,11 +412,11 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
reg = pdata->pad2;
ret = regmap_write(palmas->regmap[slave], addr, reg);
if (ret)
goto err;
goto err_irq;
} else {
ret = regmap_read(palmas->regmap[slave], addr, &reg);
if (ret)
goto err;
goto err_irq;
}

if (!(reg & PALMAS_PRIMARY_SECONDARY_PAD2_GPIO_4))
Expand All @@ -439,13 +439,13 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,

ret = regmap_write(palmas->regmap[slave], addr, reg);
if (ret)
goto err;
goto err_irq;

children = kmemdup(palmas_children, sizeof(palmas_children),
GFP_KERNEL);
if (!children) {
ret = -ENOMEM;
goto err;
goto err_irq;
}

children[PALMAS_PMIC_ID].platform_data = pdata->pmic_pdata;
Expand All @@ -458,12 +458,15 @@ static int __devinit palmas_i2c_probe(struct i2c_client *i2c,
kfree(children);

if (ret < 0)
goto err;
goto err_devices;

return ret;

err:
err_devices:
mfd_remove_devices(palmas->dev);
err_irq:
regmap_del_irq_chip(palmas->irq, palmas->irq_data);
err:
return ret;
}

Expand Down

0 comments on commit 3f059df

Please sign in to comment.