diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-01-23 22:31:36 +0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-01-28 12:51:29 +0200 |
commit | d7c3eeffbc55ad462e6447902ffa752c7e9d6aae (patch) | |
tree | 3ccc7be9def53613b8efb802b7866901b2583953 /drivers/usb/gadget | |
parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) |
usb: gadget: Remove dead branch code
'num' is a u8 variable, it never greater than 255,
So the if branch is dead code and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/function/uvc_configfs.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index bc1e2af566c3..8fe85cb4e87e 100644 --- a/drivers/usb/gadget/function/uvc_configfs.c +++ b/drivers/usb/gadget/function/uvc_configfs.c @@ -1570,10 +1570,6 @@ uvcg_uncompressed_##cname##_store(struct config_item *item, \ if (ret) \ goto end; \ \ - if (num > 255) { \ - ret = -EINVAL; \ - goto end; \ - } \ u->desc.aname = num; \ ret = len; \ end: \ @@ -1767,10 +1763,6 @@ uvcg_mjpeg_##cname##_store(struct config_item *item, \ if (ret) \ goto end; \ \ - if (num > 255) { \ - ret = -EINVAL; \ - goto end; \ - } \ u->desc.aname = num; \ ret = len; \ end: \ |