Fix usb_serial_probe() problem introduced by the recent kfifo changes
The USB serial code was a new user of the kfifo API, and it was missed when porting things to the new kfifo API. Please make the write_fifo in place. Here is my patch to fix the regression and full ported version. Signed-off-by: Stefani Seibold <stefani@seibold.net> Reported-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Greg KH <greg@kroah.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c9f937e4a3
commit
119eecc831
@@ -595,8 +595,7 @@ static void port_release(struct device *dev)
|
||||
usb_free_urb(port->write_urb);
|
||||
usb_free_urb(port->interrupt_in_urb);
|
||||
usb_free_urb(port->interrupt_out_urb);
|
||||
if (!IS_ERR(port->write_fifo) && port->write_fifo)
|
||||
kfifo_free(port->write_fifo);
|
||||
kfifo_free(&port->write_fifo);
|
||||
kfree(port->bulk_in_buffer);
|
||||
kfree(port->bulk_out_buffer);
|
||||
kfree(port->interrupt_in_buffer);
|
||||
@@ -939,7 +938,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
dev_err(&interface->dev, "No free urbs available\n");
|
||||
goto probe_error;
|
||||
}
|
||||
if (kfifo_alloc(port->write_fifo, PAGE_SIZE, GFP_KERNEL))
|
||||
if (kfifo_alloc(&port->write_fifo, PAGE_SIZE, GFP_KERNEL))
|
||||
goto probe_error;
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
port->bulk_out_size = buffer_size;
|
||||
|
Reference in New Issue
Block a user