Commit 70aacc57 authored by Amit Virdi's avatar Amit Virdi Committed by Felipe Balbi

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: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarAmit Virdi <amit.virdi@st.com>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent f7cc38b1
...@@ -1483,7 +1483,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts, ...@@ -1483,7 +1483,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
const char *page, size_t len) const char *page, size_t len)
{ {
int ret; int ret;
u8 num; u32 num;
mutex_lock(&opts->lock); mutex_lock(&opts->lock);
if (opts->refcnt) { if (opts->refcnt) {
...@@ -1491,7 +1491,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts, ...@@ -1491,7 +1491,7 @@ static ssize_t f_ss_opts_int_interval_store(struct f_ss_opts *opts,
goto end; goto end;
} }
ret = kstrtou8(page, 0, &num); ret = kstrtou32(page, 0, &num);
if (ret) if (ret)
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment