mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Huang Guobin <huangguobin4@huawei.com>, gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: Fix a possible resource leak in icom_probe
Date: Wed, 6 Apr 2022 13:06:27 +0200	[thread overview]
Message-ID: <47a0164e-c8b7-8418-c965-3d12294553f5@kernel.org> (raw)
In-Reply-To: <20220331091005.3290753-1-huangguobin4@huawei.com>

On 31. 03. 22, 11:10, Huang Guobin wrote:
> When pci_read_config_dword failed, call pci_release_regions() and
> pci_disable_device() to recycle the resource previously allocated.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>


> Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
> ---
>   drivers/tty/serial/icom.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
> index 03a2fe9f4c9a..02b375ba2f07 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1501,7 +1501,7 @@ static int icom_probe(struct pci_dev *dev,
>   	retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg);
>   	if (retval) {
>   		dev_err(&dev->dev, "PCI Config read FAILED\n");
> -		return retval;
> +		goto probe_exit0;
>   	}
>   
>   	pci_write_config_dword(dev, PCI_COMMAND,


-- 
js
suse labs

      reply	other threads:[~2022-04-06 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  9:10 Huang Guobin
2022-04-06 11:06 ` Jiri Slaby [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47a0164e-c8b7-8418-c965-3d12294553f5@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=huangguobin4@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®