diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-01-17 04:22:36 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-02-18 11:52:55 -0500 |
commit | de9db572fe5135bb2cf5bb2d8520f99a56b21d9b (patch) | |
tree | a721407025659d66a3163eb8ea134fad11976ade /drivers/usb/musb/musb_dsps.c | |
parent | 30bbae9fad15ee25686e62f97d734624b86d3405 (diff) |
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/musb/musb_dsps.c')
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 4 |
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) | |||
616 | wrp = match->data; | 616 | wrp = match->data; |
617 | 617 | ||
618 | /* allocate glue */ | 618 | /* allocate glue */ |
619 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); | 619 | glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); |
620 | if (!glue) { | 620 | if (!glue) { |
621 | dev_err(&pdev->dev, "unable to allocate glue memory\n"); | 621 | dev_err(&pdev->dev, "unable to allocate glue memory\n"); |
622 | return -ENOMEM; | 622 | return -ENOMEM; |
@@ -644,7 +644,6 @@ err3: | |||
644 | pm_runtime_put(&pdev->dev); | 644 | pm_runtime_put(&pdev->dev); |
645 | err2: | 645 | err2: |
646 | pm_runtime_disable(&pdev->dev); | 646 | pm_runtime_disable(&pdev->dev); |
647 | kfree(glue); | ||
648 | return ret; | 647 | return ret; |
649 | } | 648 | } |
650 | 649 | ||
@@ -657,7 +656,6 @@ static int dsps_remove(struct platform_device *pdev) | |||
657 | /* disable usbss clocks */ | 656 | /* disable usbss clocks */ |
658 | pm_runtime_put(&pdev->dev); | 657 | pm_runtime_put(&pdev->dev); |
659 | pm_runtime_disable(&pdev->dev); | 658 | pm_runtime_disable(&pdev->dev); |
660 | kfree(glue); | ||
661 | return 0; | 659 | return 0; |
662 | } | 660 | } |
663 | 661 | ||