From: Dan Carpenter Date: Wed, 14 Jan 2015 21:02:18 +0000 (+0300) Subject: usb: gadget: uvc: remove an impossible condition X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ceeb010ba2534f0b78efde6b3aa7d208148df92f;p=openwrt%2Fstaging%2Fblogic.git usb: gadget: uvc: remove an impossible condition "num" is a u32 so "(num > 0xFFFFFFFF)" is never true. Also the range is already checked in kstrtou32(). Acked-by: Andrzej Pietrasiewicz Acked-by: Laurent Pinchart Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index ff3058866a14..6d9c68163fe1 100644 --- a/drivers/usb/gadget/function/uvc_configfs.c +++ b/drivers/usb/gadget/function/uvc_configfs.c @@ -1156,8 +1156,6 @@ static inline int __uvcg_fill_frm_intrv(char *buf, void *priv) ret = kstrtou32(buf, 0, &num); if (ret) return ret; - if (num > 0xFFFFFFFF) - return -EINVAL; interv = priv; **interv = cpu_to_le32(num);