Commit 968bf0cf authored by Markus Elfring's avatar Markus Elfring Committed by Greg Kroah-Hartman
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1e433ac
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -354,7 +354,6 @@ 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);
}

@@ -523,7 +522,6 @@ 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);
	return urbl ? 0 : -EIDRM;
}