From linux-usb-devel-bounces@lists.sourceforge.net Wed Nov 8 06:38:10 2006 From: Mariusz Kozlowski To: Andrew Morton Date: Wed, 8 Nov 2006 15:36:51 +0100 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200611081536.52739.m.kozlowski@tuxland.pl> Cc: Greg KH , linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net Subject: usb: usb-serial free urb cleanup Content-Type: text/plain; charset="us-ascii" - usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/usb-serial.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- gregkh-2.6.orig/drivers/usb/serial/usb-serial.c +++ gregkh-2.6/drivers/usb/serial/usb-serial.c @@ -952,32 +952,28 @@ probe_error: port = serial->port[i]; if (!port) continue; - if (port->read_urb) - usb_free_urb (port->read_urb); + usb_free_urb(port->read_urb); kfree(port->bulk_in_buffer); } for (i = 0; i < num_bulk_out; ++i) { port = serial->port[i]; if (!port) continue; - if (port->write_urb) - usb_free_urb (port->write_urb); + usb_free_urb(port->write_urb); kfree(port->bulk_out_buffer); } for (i = 0; i < num_interrupt_in; ++i) { port = serial->port[i]; if (!port) continue; - if (port->interrupt_in_urb) - usb_free_urb (port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); kfree(port->interrupt_in_buffer); } for (i = 0; i < num_interrupt_out; ++i) { port = serial->port[i]; if (!port) continue; - if (port->interrupt_out_urb) - usb_free_urb (port->interrupt_out_urb); + usb_free_urb(port->interrupt_out_urb); kfree(port->interrupt_out_buffer); }