[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67ace5d3-02b3-034d-969f-9a05bbdd8e30@kernel.org>
Date: Tue, 15 Feb 2022 06:55:38 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Qing Wang <wangqing@...o.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: serial: 8250: add missing pci_dev_put() before
return
On 15. 02. 22, 3:00, Qing Wang wrote:
> From: Wang Qing <wangqing@...o.com>
>
> pci_get_slot() increases its reference count, the caller must
> decrement the reference count by calling pci_dev_put()
>
> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
> drivers/tty/serial/8250/8250_lpss.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c
> index d3bafec..57e462f
> --- a/drivers/tty/serial/8250/8250_lpss.c
> +++ b/drivers/tty/serial/8250/8250_lpss.c
> @@ -149,6 +149,8 @@ static int byt_serial_setup(struct lpss8250 *lpss, struct uart_port *port)
> /* Disable TX counter interrupts */
> writel(BYT_TX_OVF_INT_MASK, port->membase + BYT_TX_OVF_INT);
>
> + pci_dev_put(dma_dev);
What about the "return -ENODEV" few lines above?
> return 0;
> }
>
--
js
suse labs
Powered by blists - more mailing lists