summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-01-17 10:22:36 +0100
committerFelipe Balbi <balbi@ti.com>2014-02-18 17:52:55 +0100
commitde9db572fe5135bb2cf5bb2d8520f99a56b21d9b (patch)
treea721407025659d66a3163eb8ea134fad11976ade /drivers/usb
parentusb: dwc3: omap: don't check resource with devm_ioremap_resource (diff)
downloadlinux-de9db572fe5135bb2cf5bb2d8520f99a56b21d9b.tar.xz
linux-de9db572fe5135bb2cf5bb2d8520f99a56b21d9b.zip
usb: musb: dsps, use devm_kzalloc
Replace kzalloc by devm_kzalloc and remove the kfree() calls. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_dsps.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 7a109eae9b9a..68c14e1eac66 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -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 @@ err3:
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;
}