public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Harsh Kumar <harsh1kumar@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [Patch 2/2] Staging: winbond: Memory & urb freed
Date: Fri, 31 May 2013 15:44:11 +0000	[thread overview]
Message-ID: <51A8C27B.9090003@gmail.com> (raw)

Memory & urb should be freed before exiting from the function, I think.

Note: This patch is to be applied after applying the earlier patch i.e [patch 1/2]

Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>

---
 drivers/staging/winbond/wb35reg.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff -uprN a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c
--- a/drivers/staging/winbond/wb35reg.c	2013-05-31 20:03:17.000000000 +0530
+++ b/drivers/staging/winbond/wb35reg.c	2013-05-31 20:21:39.856010583 +0530
@@ -69,6 +69,9 @@ unsigned char Wb35Reg_BurstWrite(struct
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -211,6 +214,9 @@ unsigned char Wb35Reg_Write(struct hw_da
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -277,6 +283,9 @@ unsigned char Wb35Reg_WriteWithCallbackV
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -381,6 +390,9 @@ unsigned char Wb35Reg_Read(struct hw_dat
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 

             reply	other threads:[~2013-05-31 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 15:44 Harsh Kumar [this message]
2013-05-31 15:57 ` [Patch 2/2] Staging: winbond: Memory & urb freed Dan Carpenter
2013-05-31 16:30 ` Harsh Kumar
2013-05-31 16:39 ` Dan Carpenter
2013-05-31 16:46 ` Julia Lawall
2013-05-31 17:12 ` Harsh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A8C27B.9090003@gmail.com \
    --to=harsh1kumar@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox