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 <[email protected]>
Signed-off-by: Amit Virdi <[email protected]>
CC: Felipe Balbi <[email protected]>
---
drivers/usb/gadget/function/f_sourcesink.c | 4 ++--
1 file 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,
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;
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html