From: Amit Virdi Date: Tue, 9 Sep 2014 06:27:37 +0000 (+0530) Subject: usb: gadget: zero: Fix warning generated by kbuild X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70aacc5777d1f1ca0a88067c9121ce86441bc4e0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Amit Virdi CC: Felipe Balbi Signed-off-by: Felipe Balbi --- 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;