Skip to content

Commit

Permalink
serial: 8250: moxa: Store num_ports in brd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matwey V. Kornilov authored and Greg Kroah-Hartman committed Jan 12, 2017
1 parent 6def047 commit 9c4b60f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/serial/8250/8250_moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static int moxa8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
sizeof(unsigned int) * nr_ports, GFP_KERNEL);
if (!brd)
return -ENOMEM;
brd->num_ports = nr_ports;

memset(&uart, 0, sizeof(struct uart_8250_port));

Expand Down

0 comments on commit 9c4b60f

Please sign in to comment.