Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err'

Fixes the following W=1 kernel build warning(s):

drivers/tty/serial/8250/serial_cs.c: In function ‘multi_config’:
drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: "David A. Hinds" <dahinds@users.sourceforge.net>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201104193549.4026187-15-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
32ed2480 08aa5042

+3 -6
+3 -6
drivers/tty/serial/8250/serial_cs.c
··· 559 559 */ 560 560 if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO && 561 561 info->prodid == PRODID_POSSIO_GCC)) { 562 - int err; 563 - 564 562 if (link->config_index == 1 || 565 563 link->config_index == 3) { 566 - err = setup_serial(link, info, base2, 567 - link->irq); 564 + setup_serial(link, info, base2, link->irq); 568 565 base2 = link->resource[0]->start; 569 566 } else { 570 - err = setup_serial(link, info, link->resource[0]->start, 571 - link->irq); 567 + setup_serial(link, info, link->resource[0]->start, 568 + link->irq); 572 569 } 573 570 info->c950ctrl = base2; 574 571