提交 de9db572 编写于 作者: M Markus Pargmann 提交者: Felipe Balbi

usb: musb: dsps, use devm_kzalloc

Replace kzalloc by devm_kzalloc and remove the kfree() calls.
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 30bbae9f
......@@ -616,7 +616,7 @@ static int dsps_probe(struct platform_device *pdev)
wrp = match->data;
/* allocate glue */
glue = kzalloc(sizeof(*glue), GFP_KERNEL);
glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
if (!glue) {
dev_err(&pdev->dev, "unable to allocate glue memory\n");
return -ENOMEM;
......@@ -644,7 +644,6 @@ static int dsps_probe(struct platform_device *pdev)
pm_runtime_put(&pdev->dev);
err2:
pm_runtime_disable(&pdev->dev);
kfree(glue);
return ret;
}
......@@ -657,7 +656,6 @@ static int dsps_remove(struct platform_device *pdev)
/* disable usbss clocks */
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
kfree(glue);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册