Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933417AbYBGUwn (ORCPT ); Thu, 7 Feb 2008 15:52:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932874AbYBGUuh (ORCPT ); Thu, 7 Feb 2008 15:50:37 -0500 Received: from ns2.suse.de ([195.135.220.15]:38054 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932751AbYBGUuf (ORCPT ); Thu, 7 Feb 2008 15:50:35 -0500 Date: Thu, 7 Feb 2008 12:46:43 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, linux-usb@vger.kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Alan Cox Subject: [patch 04/45] USB: keyspan: Fix oops Message-ID: <20080207204643.GE16389@suse.de> References: <20080207204118.202098927@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="usb-keyspan-fix-oops.patch" In-Reply-To: <20080207204549.GA16389@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1145 Lines: 35 2.6.24-stable review patch. If anyone has any objections, please let us know. ------------------ From: Alan Cox If we get a data URB back from the hardware after we have put the tty to bed we go kaboom. Fortunately all we need to do is process the URB without trying to ram its contents down the throat of an ex-tty. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -838,7 +838,7 @@ static void usa49_indat_callback(struct port = (struct usb_serial_port *) urb->context; tty = port->tty; - if (urb->actual_length) { + if (tty && urb->actual_length) { /* 0x80 bit is error flag */ if ((data[0] & 0x80) == 0) { /* no error on any byte */ -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/