Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
[deliverable/linux.git] / drivers / mfd / pcf50633-adc.c
index 18b53cb72feae4984b44b6cea94c2f6d68fc3e40..b8941a556d7195e884e1f85d3e7017e89275a3f5 100644 (file)
@@ -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;
 }
This page took 0.03959 seconds and 5 git commands to generate.