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

Commit de9db572 authored by Markus Pargmann's avatar Markus Pargmann Committed by Felipe Balbi
Browse files

usb: musb: dsps, use devm_kzalloc



Replace kzalloc by devm_kzalloc and remove the kfree() calls.

Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 30bbae9f
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -616,7 +616,7 @@ static int dsps_probe(struct platform_device *pdev)
	wrp = match->data;
	wrp = match->data;


	/* allocate glue */
	/* allocate glue */
	glue = kzalloc(sizeof(*glue), GFP_KERNEL);
	glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
	if (!glue) {
	if (!glue) {
		dev_err(&pdev->dev, "unable to allocate glue memory\n");
		dev_err(&pdev->dev, "unable to allocate glue memory\n");
		return -ENOMEM;
		return -ENOMEM;
@@ -644,7 +644,6 @@ static int dsps_probe(struct platform_device *pdev)
	pm_runtime_put(&pdev->dev);
	pm_runtime_put(&pdev->dev);
err2:
err2:
	pm_runtime_disable(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	kfree(glue);
	return ret;
	return ret;
}
}


@@ -657,7 +656,6 @@ static int dsps_remove(struct platform_device *pdev)
	/* disable usbss clocks */
	/* disable usbss clocks */
	pm_runtime_put(&pdev->dev);
	pm_runtime_put(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	kfree(glue);
	return 0;
	return 0;
}
}