mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
serial: 8250: moxa: Store num_ports in brd
[ Upstream commit 9c4b60fe53 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d976d68e17
commit
5d29957578
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user