diff options
author | Avi Kivity <avi@redhat.com> | 2012-08-05 13:25:10 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-05 13:25:10 +0300 |
commit | fe56097b23b1303b894eefd91582e4a64247d03f (patch) | |
tree | 4b3ab60eb19e8cfe2884e2da66dd4e4e25ae2274 /drivers/leds/leds-pca955x.c | |
parent | e115676e042f4d9268c6b6d8cb7dc962aa6cfd7d (diff) | |
parent | e7882d6c40874a5b5033ca85f7508a602a60b662 (diff) |
Merge remote-tracking branch 'upstream' into next
- bring back critical fixes (esp. aa67f6096c19bc)
- provide an updated base for development
* upstream: (4334 commits)
missed mnt_drop_write() in do_dentry_open()
UBIFS: nuke pdflush from comments
gfs2: nuke pdflush from comments
drbd: nuke pdflush from comments
nilfs2: nuke write_super from comments
hfs: nuke write_super from comments
vfs: nuke pdflush from comments
jbd/jbd2: nuke write_super from comments
btrfs: nuke pdflush from comments
btrfs: nuke write_super from comments
ext4: nuke pdflush from comments
ext4: nuke write_super from comments
ext3: nuke write_super from comments
Documentation: fix the VM knobs descritpion WRT pdflush
Documentation: get rid of write_super
vfs: kill write_super and sync_supers
ACPI processor: Fix tick_broadcast_mask online/offline regression
ACPI: Only count valid srat memory structures
ACPI: Untangle a return statement for better readability
Linux 3.6-rc1
...
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'drivers/leds/leds-pca955x.c')
-rw-r--r-- | drivers/leds/leds-pca955x.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index 5f462dbf0db..aef3cf0432f 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c @@ -293,15 +293,14 @@ static int __devinit pca955x_probe(struct i2c_client *client, } } - pca955x = kzalloc(sizeof(*pca955x), GFP_KERNEL); + pca955x = devm_kzalloc(&client->dev, sizeof(*pca955x), GFP_KERNEL); if (!pca955x) return -ENOMEM; - pca955x->leds = kzalloc(sizeof(*pca955x_led) * chip->bits, GFP_KERNEL); - if (!pca955x->leds) { - err = -ENOMEM; - goto exit_nomem; - } + pca955x->leds = devm_kzalloc(&client->dev, + sizeof(*pca955x_led) * chip->bits, GFP_KERNEL); + if (!pca955x->leds) + return -ENOMEM; i2c_set_clientdata(client, pca955x); @@ -361,10 +360,6 @@ exit: cancel_work_sync(&pca955x->leds[i].work); } - kfree(pca955x->leds); -exit_nomem: - kfree(pca955x); - return err; } @@ -378,9 +373,6 @@ static int __devexit pca955x_remove(struct i2c_client *client) cancel_work_sync(&pca955x->leds[i].work); } - kfree(pca955x->leds); - kfree(pca955x); - return 0; } |