From: Lee Jones Date: Mon, 6 Jul 2020 13:33:34 +0000 (+0100) Subject: usb: early: ehci-dbgp: Remove set but never checked variable 'ret' X-Git-Tag: v5.10.7~1952^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=beb368a4b9cbe67894354b884fa34e8e2e701a92;p=platform%2Fkernel%2Flinux-rpi.git usb: early: ehci-dbgp: Remove set but never checked variable 'ret' 'ret' hasn't been checked since the driver's inception in 2009. Fixes the following W=1 kernel build warning(s): drivers/usb/early/ehci-dbgp.c: In function ‘early_dbgp_write’: drivers/usb/early/ehci-dbgp.c:915:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 915 | int chunk, ret; | ^~~ Cc: Sumit Garg Cc: Daniel Thompson Cc: Douglas Anderson Cc: Petr Mladek Cc: Yinghai Lu Cc: Jason Wessel Signed-off-by: Lee Jones Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20200706133341.476881-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c index 775cf70..b075dbf 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c @@ -912,7 +912,7 @@ int __init early_dbgp_init(char *s) static void early_dbgp_write(struct console *con, const char *str, u32 n) { - int chunk, ret; + int chunk; char buf[DBGP_MAX_PACKET]; int use_cr = 0; u32 cmd, ctrl; @@ -951,8 +951,8 @@ static void early_dbgp_write(struct console *con, const char *str, u32 n) buf[chunk] = *str; } if (chunk > 0) { - ret = dbgp_bulk_write(USB_DEBUG_DEVNUM, - dbgp_endpoint_out, buf, chunk); + dbgp_bulk_write(USB_DEBUG_DEVNUM, + dbgp_endpoint_out, buf, chunk); } } if (unlikely(reset_run)) {