From 70aacc5777d1f1ca0a88067c9121ce86441bc4e0 Mon Sep 17 00:00:00 2001 From: Amit Virdi Date: Tue, 9 Sep 2014 11:57:37 +0530 Subject: [PATCH] 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 --- 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;