diff mbox

[RESEND,v3,4/4] usb: musb: dsps, use devm_kzalloc

Message ID 1384790078-15366-5-git-send-email-mpa@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Markus Pargmann Nov. 18, 2013, 3:54 p.m. UTC
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/usb/musb/musb_dsps.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Felipe Balbi Nov. 25, 2013, 3:58 p.m. UTC | #1
On Mon, Nov 18, 2013 at 04:54:38PM +0100, Markus Pargmann wrote:
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

no commit log == no commit. Sorry, but I'll be very pedantic about it.
Markus Pargmann Nov. 26, 2013, 9:26 a.m. UTC | #2
On Mon, Nov 25, 2013 at 09:58:04AM -0600, Felipe Balbi wrote:
> On Mon, Nov 18, 2013 at 04:54:38PM +0100, Markus Pargmann wrote:
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> 
> no commit log == no commit. Sorry, but I'll be very pedantic about it.

Okay I will add a commit message.

Regards,

Markus
Felipe Balbi Nov. 26, 2013, 4:41 p.m. UTC | #3
On Tue, Nov 26, 2013 at 10:26:17AM +0100, Markus Pargmann wrote:
> On Mon, Nov 25, 2013 at 09:58:04AM -0600, Felipe Balbi wrote:
> > On Mon, Nov 18, 2013 at 04:54:38PM +0100, Markus Pargmann wrote:
> > > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > 
> > no commit log == no commit. Sorry, but I'll be very pedantic about it.
> 
> Okay I will add a commit message.

yeah, even if obvious.
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 06debf8..058d611 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -596,7 +596,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;
@@ -624,7 +624,6 @@  err3:
 	pm_runtime_put(&pdev->dev);
 err2:
 	pm_runtime_disable(&pdev->dev);
-	kfree(glue);
 	return ret;
 }
 
@@ -637,7 +636,6 @@  static int dsps_remove(struct platform_device *pdev)
 	/* disable usbss clocks */
 	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	kfree(glue);
 
 	debugfs_remove_recursive(glue->dbgfs_root);