aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Virdi <amit.virdi@st.com>2014-09-09 02:27:37 -0400
committerFelipe Balbi <balbi@ti.com>2014-09-09 10:46:58 -0400
commit70aacc5777d1f1ca0a88067c9121ce86441bc4e0 (patch)
tree19bca28d8c82b49af93b8427585342c760282bd2
parentf7cc38b16e2741186253be3dff61a9d124112126 (diff)
usb: gadget: zero: Fix warning generated by kbuild
The kbuild test bot generated the warning: drivers/usb/gadget/function/f_sourcesink.c:1498: warning: comparison is always false due to limited range of data type This patch fixes it. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/gadget/function/f_sourcesink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index 7c091a328228..80be25b32cd7 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -1483,7 +1483,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
1483 const char *page, size_t len) 1483 const char *page, size_t len)
1484{ 1484{
1485 int ret; 1485 int ret;
1486 u8 num; 1486 u32 num;
1487 1487
1488 mutex_lock(&opts->lock); 1488 mutex_lock(&opts->lock);
1489 if (opts->refcnt) { 1489 if (opts->refcnt) {
@@ -1491,7 +1491,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
1491 goto end; 1491 goto end;
1492 } 1492 }
1493 1493
1494 ret = kstrtou8(page, 0, &num); 1494 ret = kstrtou32(page, 0, &num);
1495 if (ret) 1495 if (ret)
1496 goto end; 1496 goto end;
1497 1497