diff options
-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 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) | |||
203 | { | 203 | { |
204 | struct pcf50633_adc *adc; | 204 | struct pcf50633_adc *adc; |
205 | 205 | ||
206 | adc = kzalloc(sizeof(*adc), GFP_KERNEL); | 206 | adc = devm_kzalloc(&pdev->dev, sizeof(*adc), GFP_KERNEL); |
207 | if (!adc) | 207 | if (!adc) |
208 | return -ENOMEM; | 208 | return -ENOMEM; |
209 | 209 | ||
@@ -236,7 +236,6 @@ static int pcf50633_adc_remove(struct platform_device *pdev) | |||
236 | kfree(adc->queue[i]); | 236 | kfree(adc->queue[i]); |
237 | 237 | ||
238 | mutex_unlock(&adc->queue_mutex); | 238 | mutex_unlock(&adc->queue_mutex); |
239 | kfree(adc); | ||
240 | 239 | ||
241 | return 0; | 240 | return 0; |
242 | } | 241 | } |