usb: gadget: zero: Fix warning generated by kbuild
authorAmit Virdi <amit.virdi@st.com>
Tue, 9 Sep 2014 06:27:37 +0000 (11:57 +0530)
committerFelipe Balbi <balbi@ti.com>
Tue, 9 Sep 2014 14:46:58 +0000 (09:46 -0500)
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>
drivers/usb/gadget/function/f_sourcesink.c

index 7c091a3282288476719602737a3d37870e0b108a..80be25b32cd7a82f2dbc9d57e4b370bb86a9bad0 100644 (file)
@@ -1483,7 +1483,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
                                       const char *page, size_t len)
 {
        int ret;
-       u8 num;
+       u32 num;
 
        mutex_lock(&opts->lock);
        if (opts->refcnt) {
@@ -1491,7 +1491,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
                goto end;
        }
 
-       ret = kstrtou8(page, 0, &num);
+       ret = kstrtou32(page, 0, &num);
        if (ret)
                goto end;