diff options
author | taeyoung <ty317.kim@samsung.com> | 2016-10-10 15:34:28 +0900 |
---|---|---|
committer | Kunhoon Baik <knhoon.baik@samsung.com> | 2016-10-11 13:32:50 +0900 |
commit | 925ddab7ce6b19d6fdadf19e6e358cad09403e88 (patch) | |
tree | 114130096fea9c54fe86e65affdaf30507f04e48 | |
parent | db3e02344988a077005923b26baceb0728656525 (diff) | |
download | device-manager-plugin-odroid-925ddab7ce6b19d6fdadf19e6e358cad09403e88.tar.gz device-manager-plugin-odroid-925ddab7ce6b19d6fdadf19e6e358cad09403e88.tar.bz2 device-manager-plugin-odroid-925ddab7ce6b19d6fdadf19e6e358cad09403e88.zip |
checking unsupported usb function combination.tizen_4.0.m1_releasesubmit/tizen_unified/20170308.100403submit/tizen_4.0/20170828.110001submit/tizen_4.0/20170811.094300submit/tizen_3.0_common/20161104.104000submit/tizen_3.0/20161028.082323submit/tizen_3.0/20161028.062323submit/tizen_3.0.m2/20170104.093748submit/tizen/20161011.055923accepted/tizen/unified/20170309.031041accepted/tizen/tv/20161011.234112accepted/tizen/ivi/20161011.234141accepted/tizen/common/20161011.154305accepted/tizen/4.0/unified/20170828.224215accepted/tizen/4.0/unified/20170816.011524accepted/tizen/3.0/tv/20161028.122602accepted/tizen/3.0/ivi/20161028.123013accepted/tizen/3.0/common/20161114.105118accepted/tizen/3.0.m2/tv/20170104.100353tizen_3.0_tvtizen_3.0.m2tizen_3.0accepted/tizen_tvaccepted/tizen_iviaccepted/tizen_commonaccepted/tizen_3.0_tvaccepted/tizen_3.0_iviaccepted/tizen_3.0_commonaccepted/tizen_3.0.m2_tv
refer to : https://review.tizen.org/gerrit/#/c/91714/
Change-Id: Ie8e9a4cbf8e3e4c0d625f8b24df3d16aa7074682
Signed-off-by: taeyoung <ty317.kim@samsung.com>
-rw-r--r-- | hw/usb_gadget/usb_gadget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb_gadget/usb_gadget.c b/hw/usb_gadget/usb_gadget.c index 0bcb10b..fcf144c 100644 --- 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; } |