diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 09:48:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-06 09:48:31 -0700 |
commit | c87985a3ce723995fc7b25e598238d67154108a1 (patch) | |
tree | e60def1b77c25c1d74180f62e8a5603f9826f209 /drivers/leds/leds-bd2802.c | |
parent | d155255a344c417acad74156654295a2964e6b81 (diff) | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
Merge tty-next into 3.6-rc1
This handles the merge issue in:
arch/um/drivers/line.c
arch/um/drivers/line.h
And resolves the duplicate patches that were in both trees do to the
tty-next branch not getting merged into 3.6-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds/leds-bd2802.c')
-rw-r--r-- | drivers/leds/leds-bd2802.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c index 591cbdf5a04..89ca6a2a19d 100644 --- a/drivers/leds/leds-bd2802.c +++ b/drivers/leds/leds-bd2802.c @@ -677,7 +677,7 @@ static int __devinit bd2802_probe(struct i2c_client *client, struct bd2802_led_platform_data *pdata; int ret, i; - led = kzalloc(sizeof(struct bd2802_led), GFP_KERNEL); + led = devm_kzalloc(&client->dev, sizeof(struct bd2802_led), GFP_KERNEL); if (!led) { dev_err(&client->dev, "failed to allocate driver data\n"); return -ENOMEM; @@ -697,7 +697,7 @@ static int __devinit bd2802_probe(struct i2c_client *client, ret = bd2802_write_byte(client, BD2802_REG_CLKSETUP, 0x00); if (ret < 0) { dev_err(&client->dev, "failed to detect device\n"); - goto failed_free; + return ret; } else dev_info(&client->dev, "return 0x%02x\n", ret); @@ -729,9 +729,6 @@ static int __devinit bd2802_probe(struct i2c_client *client, failed_unregister_dev_file: for (i--; i >= 0; i--) device_remove_file(&led->client->dev, bd2802_attributes[i]); -failed_free: - kfree(led); - return ret; } @@ -746,7 +743,6 @@ static int __exit bd2802_remove(struct i2c_client *client) bd2802_disable_adv_conf(led); for (i = 0; i < ARRAY_SIZE(bd2802_attributes); i++) device_remove_file(&led->client->dev, bd2802_attributes[i]); - kfree(led); return 0; } |