diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-19 10:21:21 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-19 10:21:21 -0700 |
commit | 0b6c404a07e3240b95aa5682fb8fd57c41609d7a (patch) | |
tree | c4d410b0ec7044922b73c39ecfb3fbb620c29282 /drivers/leds/leds-atmel-pwm.c | |
parent | 609455f481772c5a875b88e860a2ee0e2f25ebf0 (diff) | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) |
Merge tag 'v3.6-rc5' into for-linus
Sync with mainline so that I can revert an input patch that came in through
another subsystem tree.
Diffstat (limited to 'drivers/leds/leds-atmel-pwm.c')
-rw-r--r-- | drivers/leds/leds-atmel-pwm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/leds/leds-atmel-pwm.c b/drivers/leds/leds-atmel-pwm.c index 64ad702a2ec..45430632faa 100644 --- a/drivers/leds/leds-atmel-pwm.c +++ b/drivers/leds/leds-atmel-pwm.c @@ -46,7 +46,8 @@ static int __devinit pwmled_probe(struct platform_device *pdev) if (!pdata || pdata->num_leds < 1) return -ENODEV; - leds = kcalloc(pdata->num_leds, sizeof(*leds), GFP_KERNEL); + leds = devm_kzalloc(&pdev->dev, pdata->num_leds * sizeof(*leds), + GFP_KERNEL); if (!leds) return -ENOMEM; @@ -108,7 +109,6 @@ err: pwm_channel_free(&leds[i].pwmc); } } - kfree(leds); return status; } @@ -129,7 +129,6 @@ static int __exit pwmled_remove(struct platform_device *pdev) pwm_channel_free(&led->pwmc); } - kfree(leds); platform_set_drvdata(pdev, NULL); return 0; } |