Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319782
b: refs/heads/master
c: b671941
h: refs/heads/master
v: v3
  • Loading branch information
Laxman Dewangan authored and Samuel Ortiz committed Jul 24, 2012
1 parent a28f34e commit 3a343b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 96c905f408d4ed16b7b87d7d2b16e8d8d02f0cc8
refs/heads/master: b6719412dc28458f3c142a27bf3e0d2ab3ce0573
12 changes: 6 additions & 6 deletions trunk/drivers/mfd/tps6586x.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,11 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,

dev_info(&client->dev, "VERSIONCRC is %02x\n", ret);

tps6586x = kzalloc(sizeof(struct tps6586x), GFP_KERNEL);
if (tps6586x == NULL)
tps6586x = devm_kzalloc(&client->dev, sizeof(*tps6586x), GFP_KERNEL);
if (tps6586x == NULL) {
dev_err(&client->dev, "memory for tps6586x alloc failed\n");
return -ENOMEM;
}

tps6586x->client = client;
tps6586x->dev = &client->dev;
Expand All @@ -594,7 +596,7 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
pdata->irq_base);
if (ret) {
dev_err(&client->dev, "IRQ init failed: %d\n", ret);
goto err_irq_init;
return ret;
}
}

Expand Down Expand Up @@ -622,8 +624,7 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
err_gpio_init:
if (client->irq)
free_irq(client->irq, tps6586x);
err_irq_init:
kfree(tps6586x);

return ret;
}

Expand All @@ -644,7 +645,6 @@ static int __devexit tps6586x_i2c_remove(struct i2c_client *client)
}

tps6586x_remove_subdevs(tps6586x);
kfree(tps6586x);
return 0;
}

Expand Down

0 comments on commit 3a343b0

Please sign in to comment.