Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbcL2StB (ORCPT ); Thu, 29 Dec 2016 13:49:01 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34209 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906AbcL2StA (ORCPT ); Thu, 29 Dec 2016 13:49:00 -0500 From: "Matwey V. Kornilov" To: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, m.othacehe@gmail.com Cc: "Matwey V. Kornilov" Subject: [PATCH] serial: 8250: moxa: Store num_ports in brd Date: Thu, 29 Dec 2016 21:48:51 +0300 Message-Id: <1483037331-3002-1-git-send-email-matwey@sai.msu.ru> X-Mailer: git-send-email 2.6.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 735 Lines: 22 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 --- drivers/tty/serial/8250/8250_moxa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_moxa.c b/drivers/tty/serial/8250/8250_moxa.c index 26eb539..d5069b2 100644 --- a/drivers/tty/serial/8250/8250_moxa.c +++ b/drivers/tty/serial/8250/8250_moxa.c @@ -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)); -- 2.6.6