]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/usbstring.c
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
[u-boot] / drivers / usb / gadget / usbstring.c
index de5fa3f6483f3e5529b01cceb599146aa7c07b16..8c3ff64fe35359566a673a08791228d4f95989cf 100644 (file)
@@ -108,6 +108,9 @@ usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8 *buf)
        struct usb_string       *s;
        int                     len;
 
+       if (!table)
+               return -EINVAL;
+
        /* descriptor 0 has the language id */
        if (id == 0) {
                buf[0] = 4;