projects
/
platform
/
hal
/
backend
/
tw3
/
device-tw3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516e659
)
checking unsupported usb function combination.
author
Kunhoon Baik
<knhoon.baik@samsung.com>
Tue, 11 Oct 2016 04:14:51 +0000
(13:14 +0900)
committer
Kunhoon Baik
<knhoon.baik@samsung.com>
Tue, 11 Oct 2016 04:17:11 +0000
(13:17 +0900)
Change-Id: Iaa88182ddc6e4b7de7fee606fb6deb86252932ea
hw/usb_gadget/usb_gadget.c
patch
|
blob
|
history
diff --git
a/hw/usb_gadget/usb_gadget.c
b/hw/usb_gadget/usb_gadget.c
index
0bcb10b
..
fcf144c
100644
(file)
--- a/
hw/usb_gadget/usb_gadget.c
+++ b/
hw/usb_gadget/usb_gadget.c
@@
-185,7
+185,7
@@
static int simple_id_to_gadget(struct usb_gadget_id *gadget_id,
struct usb_gadget **_gadget)
{
struct usb_gadget *gadget;
- int n_configs;
+ int n_configs
= 0
;
/* zero terminates */
int functions[2][sizeof(gadget_id->function_mask)*8];
int n_functions;
@@
-285,7
+285,7
@@
static int simple_id_to_gadget(struct usb_gadget_id *gadget_id,
break;
};
- if (n_configs > 2) {
+ if (n_configs > 2
|| n_configs <= 0
) {
ret = -EINVAL;
goto free_gadget;
}