summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2006-11-08 15:36:34 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:23:34 -0800
commit1cadc1378fe9cdee9515842a4bf9f42228448ad2 (patch)
tree7797fe3a55b9238aff724854d64c36c5a5fbc71b /drivers/usb
parent9a25f44f91b621f49b459687ae49d4fed4423d0e (diff)
usb: keyspan free urb cleanup
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/keyspan.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 53be824eb1b..7639652cec4 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -2306,22 +2306,16 @@ static void keyspan_shutdown (struct usb_serial *serial)
}
/* Now free them */
- if (s_priv->instat_urb)
- usb_free_urb(s_priv->instat_urb);
- if (s_priv->glocont_urb)
- usb_free_urb(s_priv->glocont_urb);
+ usb_free_urb(s_priv->instat_urb);
+ usb_free_urb(s_priv->glocont_urb);
for (i = 0; i < serial->num_ports; ++i) {
port = serial->port[i];
p_priv = usb_get_serial_port_data(port);
- if (p_priv->inack_urb)
- usb_free_urb(p_priv->inack_urb);
- if (p_priv->outcont_urb)
- usb_free_urb(p_priv->outcont_urb);
+ usb_free_urb(p_priv->inack_urb);
+ usb_free_urb(p_priv->outcont_urb);
for (j = 0; j < 2; j++) {
- if (p_priv->in_urbs[j])
- usb_free_urb(p_priv->in_urbs[j]);
- if (p_priv->out_urbs[j])
- usb_free_urb(p_priv->out_urbs[j]);
+ usb_free_urb(p_priv->in_urbs[j]);
+ usb_free_urb(p_priv->out_urbs[j]);
}
}