usbserial: Reference leak

A sufficiently-large number of USB serial devices causes a reference leak
when /proc/tty/drivers/usbserial is read.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Matthias Urlichs and committed by Greg Kroah-Hartman 59925838 05ff0e29

+3 -1
+3 -1
drivers/usb/serial/usb-serial.c
··· 464 length += sprintf (page+length, " path:%s", tmp); 465 466 length += sprintf (page+length, "\n"); 467 - if ((length + begin) > (off + count)) 468 goto done; 469 if ((length + begin) < off) { 470 begin += length; 471 length = 0;
··· 464 length += sprintf (page+length, " path:%s", tmp); 465 466 length += sprintf (page+length, "\n"); 467 + if ((length + begin) > (off + count)) { 468 + usb_serial_put(serial); 469 goto done; 470 + } 471 if ((length + begin) < off) { 472 begin += length; 473 length = 0;