All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harsh Kumar <harsh1kumar@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [Patch 5/5] Staging: winbond: usb_free_urb(NULL) is safe
Date: Wed, 26 Sep 2012 18:18:15 +0000	[thread overview]
Message-ID: <50634417.6000109@gmail.com> (raw)

usb_free_urb(NULL) is safe. So, the check was removed.

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

---
 drivers/staging/winbond/wb35tx.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff -uprN a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -170,11 +170,8 @@ void Wb35Tx_destroy(struct hw_data *pHwD
 	} while ((pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP));
 	msleep(10); /* Delay for waiting function enter 940623.1.b */
 
-	if (pWb35Tx->Tx4Urb)
-		usb_free_urb(pWb35Tx->Tx4Urb);
-
-	if (pWb35Tx->Tx2Urb)
-		usb_free_urb(pWb35Tx->Tx2Urb);
+	usb_free_urb(pWb35Tx->Tx4Urb);
+	usb_free_urb(pWb35Tx->Tx2Urb);
 
 	pr_debug("Wb35Tx_destroy OK\n");
 }

             reply	other threads:[~2012-09-26 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 18:18 Harsh Kumar [this message]
2012-09-28 21:14 ` [Patch 5/5] Staging: winbond: usb_free_urb(NULL) is safe Pavel Machek

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=50634417.6000109@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.