Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295181
b: refs/heads/master
c: 920c4f4
h: refs/heads/master
i:
  295179: b67d2fe
v: v3
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Mar 23, 2012
1 parent 9408090 commit 106f622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 3a2fd4a14112452eb5c1a079ac8b3f4842762afe
refs/heads/master: 920c4f4c3651855f888ec708ecc656ba10dd8f1d
8 changes: 3 additions & 5 deletions trunk/drivers/leds/leds-tca6507.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,9 @@ static int __devinit tca6507_probe(struct i2c_client *client,
NUM_LEDS);
return -ENODEV;
}
err = -ENOMEM;
tca = kzalloc(sizeof(*tca), GFP_KERNEL);
if (!tca)
goto exit;
return -ENOMEM;

tca->client = client;
INIT_WORK(&tca->work, tca6507_work);
Expand Down Expand Up @@ -724,11 +723,10 @@ static int __devinit tca6507_probe(struct i2c_client *client,

return 0;
exit:
while (i--)
while (i--) {
if (tca->leds[i].led_cdev.name)
led_classdev_unregister(&tca->leds[i].led_cdev);
cancel_work_sync(&tca->work);
i2c_set_clientdata(client, NULL);
}
kfree(tca);
return err;
}
Expand Down

0 comments on commit 106f622

Please sign in to comment.