From 9e2eaa4c6305198e91e2f77cb4de69a694f70119 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Mon, 30 Jul 2012 14:40:31 -0700 Subject: [PATCH] --- yaml --- r: 319912 b: refs/heads/master c: a4be29ac6df4f7c7a0225f7f72c78f4fb10114c0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/backlight/atmel-pwm-bl.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9d004bc1009d..c8d3c1a770dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a824c73cc33e149f79914bcebd90ace1433c0721 +refs/heads/master: a4be29ac6df4f7c7a0225f7f72c78f4fb10114c0 diff --git a/trunk/drivers/video/backlight/atmel-pwm-bl.c b/trunk/drivers/video/backlight/atmel-pwm-bl.c index 0443a4f71858..cd64073d3f53 100644 --- a/trunk/drivers/video/backlight/atmel-pwm-bl.c +++ b/trunk/drivers/video/backlight/atmel-pwm-bl.c @@ -127,7 +127,8 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev) struct atmel_pwm_bl *pwmbl; int retval; - pwmbl = kzalloc(sizeof(struct atmel_pwm_bl), GFP_KERNEL); + pwmbl = devm_kzalloc(&pdev->dev, sizeof(struct atmel_pwm_bl), + GFP_KERNEL); if (!pwmbl) return -ENOMEM; @@ -202,7 +203,6 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev) err_free_pwm: pwm_channel_free(&pwmbl->pwmc); err_free_mem: - kfree(pwmbl); return retval; } @@ -218,7 +218,6 @@ static int __exit atmel_pwm_bl_remove(struct platform_device *pdev) pwm_channel_free(&pwmbl->pwmc); backlight_device_unregister(pwmbl->bldev); platform_set_drvdata(pdev, NULL); - kfree(pwmbl); return 0; }