summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/usbstring.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-05-09 10:47:05 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-05-09 11:50:14 +0200
commitd2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19 (patch)
treed71aae6d706d1f3b01da5f944e247abe308feea0 /drivers/usb/gadget/usbstring.c
parent7904b70885f3c589c239f6ac978f299a6744557f (diff)
parent173d294b94cfec10063a5be40934d6d8fb7981ce (diff)
downloadblackbird-obmc-uboot-d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19.tar.gz
blackbird-obmc-uboot-d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19.zip
Merge branch 'u-boot/master'
Conflicts: drivers/net/Makefile (trivial merge)
Diffstat (limited to 'drivers/usb/gadget/usbstring.c')
-rw-r--r--drivers/usb/gadget/usbstring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index de5fa3f648..8c3ff64fe3 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -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;
OpenPOWER on IntegriCloud