usb: acm gadget: Null termintate strings table
authorGraham Williams <gwilli@broadcom.com>
Wed, 28 Aug 2013 23:36:14 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Aug 2013 18:10:36 +0000 (11:10 -0700)
The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams <gwilli@broadcom.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/f_acm.c

index 4b7e33e5d9c624a452ee4917d3511f085717ffaf..ab1065afbbd0c0cac55788dad3b805f9a240b2a9 100644 (file)
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
        [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
        [ACM_DATA_IDX].s = "CDC ACM Data",
        [ACM_IAD_IDX ].s = "CDC Serial",
+       {  } /* end of list */
 };
 
 static struct usb_gadget_strings acm_string_table = {