From: Dan Carpenter Date: Fri, 13 Mar 2015 09:11:06 +0000 (+0300) Subject: usb: gadget: printer: delete some dead code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fdb51e3d97552413c851bf8426ef69508389df88;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git usb: gadget: printer: delete some dead code "num" is a u16 so it can't go higher than 65535. kstrtou16() has a range check built in so this is already handled. Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/function/f_printer.c b/drivers/usb/gadget/function/f_printer.c index 757fcf070013..caa56de3a3e8 100644 --- a/drivers/usb/gadget/function/f_printer.c +++ b/drivers/usb/gadget/function/f_printer.c @@ -1223,11 +1223,6 @@ static ssize_t f_printer_opts_q_len_store(struct f_printer_opts *opts, if (ret) goto end; - if (num > 65535) { - ret = -EINVAL; - goto end; - } - opts->q_len = (unsigned)num; ret = len; end: