Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a105ca2 authored by Jingoo Han's avatar Jingoo Han Committed by Lee Jones
Browse files

mfd: pcf50633-adc: Use devm_*() functions



Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent bba07827
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}