diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-20 16:05:29 +0900 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-08-20 09:27:35 +0100 |
commit | 8a105ca202b1a1061a24f1e980206cd2808e2f8b (patch) | |
tree | 84ea0b9a8b40b838dbeb80ca815dd8b7dd93ee88 /drivers | |
parent | bba078273e259c7eff729ac00a1476987ad5413a (diff) |
mfd: pcf50633-adc: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/pcf50633-adc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/pcf50633-adc.c b/drivers/mfd/pcf50633-adc.c index 18b53cb72fe..b8941a556d7 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; } |