diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-25 16:51:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-26 14:00:22 -0800 |
commit | 968bf0cf0c18523b491a030bd56fab4c1e1640bb (patch) | |
tree | 5732be94591f3623ce74cd336505e4f222847255 /drivers/staging/ozwpan | |
parent | c1e433accdb6b6a10c7be4376a0f6ec4205a51e9 (diff) | |
download | linux-stable-968bf0cf0c18523b491a030bd56fab4c1e1640bb.tar.gz linux-stable-968bf0cf0c18523b491a030bd56fab4c1e1640bb.tar.bz2 linux-stable-968bf0cf0c18523b491a030bd56fab4c1e1640bb.zip |
staging: ozwpan: Deletion of unnecessary checks before the function call "oz_free_urb_link"
The oz_free_urb_link() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan')
-rw-r--r-- | drivers/staging/ozwpan/ozhcd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 27217d75f155..057632c3f1cc 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -354,8 +354,7 @@ static void oz_complete_urb(struct usb_hcd *hcd, struct urb *urb, } spin_lock(&g_tasklet_lock); spin_unlock_irqrestore(&g_tasklet_lock, irq_state); - if (cancel_urbl) - oz_free_urb_link(cancel_urbl); + oz_free_urb_link(cancel_urbl); } /* @@ -523,8 +522,7 @@ static int oz_dequeue_ep_urb(struct oz_port *port, u8 ep_addr, int in_dir, } } spin_unlock_bh(&port->ozhcd->hcd_lock); - if (urbl) - oz_free_urb_link(urbl); + oz_free_urb_link(urbl); return urbl ? 0 : -EIDRM; } |