Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261893
b: refs/heads/master
c: dc7e412
h: refs/heads/master
i:
  261891: 5bd9f26
v: v3
  • Loading branch information
Jesper Juhl authored and Samuel Ortiz committed Jul 31, 2011
1 parent 746a00d commit bdb1ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: f7eb6c5e8e5e1e96c36763778e9a78b9da6fcd31
refs/heads/master: dc7e412d431db5da7fa252f4c3ed475ef4af3e8a
6 changes: 5 additions & 1 deletion trunk/drivers/mfd/tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
init_data->irq_base = pmic_plat_data->irq;

tps65910 = kzalloc(sizeof(struct tps65910), GFP_KERNEL);
if (tps65910 == NULL)
if (tps65910 == NULL) {
kfree(init_data);
return -ENOMEM;
}

i2c_set_clientdata(i2c, tps65910);
tps65910->dev = &i2c->dev;
Expand All @@ -174,11 +176,13 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
if (ret < 0)
goto err;

kfree(init_data);
return ret;

err:
mfd_remove_devices(tps65910->dev);
kfree(tps65910);
kfree(init_data);
return ret;
}

Expand Down

0 comments on commit bdb1ad2

Please sign in to comment.