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

serial: 8250: moxa: Store num_ports in brd

When struct moxa8250_board is allocated, then num_ports should
be initialized in order to use it later in moxa8250_remove.

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Matwey V. Kornilov and committed by
Greg Kroah-Hartman
9c4b60fe 6def047c

+1
+1
drivers/tty/serial/8250/8250_moxa.c
··· 68 68 sizeof(unsigned int) * nr_ports, GFP_KERNEL); 69 69 if (!brd) 70 70 return -ENOMEM; 71 + brd->num_ports = nr_ports; 71 72 72 73 memset(&uart, 0, sizeof(struct uart_8250_port)); 73 74