Commit beb368a4 authored by Lee Jones's avatar Lee Jones Committed by Greg Kroah-Hartman

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 <sumit.garg@linaro.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Link: https://lore.kernel.org/r/20200706133341.476881-26-lee.jones@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6b073de
......@@ -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)) {
......
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