linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] qcserial: log when an interface has too many altsettings
@ 2012-02-01 21:07 Thomas Tuttle
  2012-02-01 21:11 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Tuttle @ 2012-02-01 21:07 UTC (permalink / raw)
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
  Cc: linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Thomas Tuttle <ttuttle-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/usb/serial/qcserial.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 26e3e30..5a817d6 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -145,8 +145,12 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
 		/* Gobi 2000 has a single altsetting, older ones have two */
 		if (serial->interface->num_altsetting == 2)
 			intf = &serial->interface->altsetting[1];
-		else if (serial->interface->num_altsetting > 2)
+		else if (serial->interface->num_altsetting > 2) {
+			dev_err(&serial->dev->dev,
+				"too many altsettings: %u",
+				serial->interface->num_altsetting);
 			break;
+		}
 
 		if (intf->desc.bNumEndpoints == 2 &&
 		    usb_endpoint_is_bulk_in(&intf->endpoint[0].desc) &&
-- 
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-01 22:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01 21:07 [PATCH 2/4] qcserial: log when an interface has too many altsettings Thomas Tuttle
2012-02-01 21:11 ` Greg KH
     [not found]   ` <20120201211116.GA30758-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-02-01 21:47     ` ttuttle
2012-02-01 22:02       ` Greg KH
2012-02-01 22:15         ` ttuttle
     [not found]           ` <CADyrwZQNMpxh5yTBnH68+0KK9r5NFvFMgad1K8qXouWAHY=1Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-01 22:23             ` Greg KH
2012-02-01 22:25               ` ttuttle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).