From: Jingoo Han Date: Tue, 20 Aug 2013 07:05:29 +0000 (+0900) Subject: mfd: pcf50633-adc: Use devm_*() functions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a105ca202b1a1061a24f1e980206cd2808e2f8b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mfd: pcf50633-adc: Use devm_*() functions Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/pcf50633-adc.c b/drivers/mfd/pcf50633-adc.c index 18b53cb72fea..b8941a556d71 100644 --- a/drivers/mfd/pcf50633-adc.c +++ b/drivers/mfd/pcf50633-adc.c @@ -203,7 +203,7 @@ static int pcf50633_adc_probe(struct platform_device *pdev) { struct pcf50633_adc *adc; - adc = kzalloc(sizeof(*adc), GFP_KERNEL); + adc = devm_kzalloc(&pdev->dev, sizeof(*adc), GFP_KERNEL); if (!adc) return -ENOMEM; @@ -236,7 +236,6 @@ static int pcf50633_adc_remove(struct platform_device *pdev) kfree(adc->queue[i]); mutex_unlock(&adc->queue_mutex); - kfree(adc); return 0; }