kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: Re: [PATCH] uio/uio_pci_generic: fix return value changed in refactoring
Date: Fri, 23 Apr 2021 16:28:15 -0400	[thread overview]
Message-ID: <20210423162757-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20210422192240.1136373-1-martin.agren@gmail.com>

On Thu, Apr 22, 2021 at 09:22:40PM +0200, Martin Ågren wrote:
> Commit ef84928cff58 ("uio/uio_pci_generic: use device-managed function
> equivalents") was able to simplify various error paths thanks to no
> longer having to clean up on the way out. Some error paths were dropped,
> others were simplified. In one of those simplifications, the return
> value was accidentally changed from -ENODEV to -ENOMEM. Restore the old
> return value.
> 
> Fixes: ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents")
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  This is my first contribution to the Linux kernel. Hints, suggestions,
>  corrections and any other feedback welcome.
> 
>  drivers/uio/uio_pci_generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c
> index c7d681fef198..3bb0b0075467 100644
> --- a/drivers/uio/uio_pci_generic.c
> +++ b/drivers/uio/uio_pci_generic.c
> @@ -81,9 +81,9 @@ static int probe(struct pci_dev *pdev,
>  		return err;
>  	}
>  
>  	if (pdev->irq && !pci_intx_mask_supported(pdev))
> -		return -ENOMEM;
> +		return -ENODEV;
>  
>  	gdev = devm_kzalloc(&pdev->dev, sizeof(struct uio_pci_generic_dev), GFP_KERNEL);
>  	if (!gdev)
>  		return -ENOMEM;
> -- 
> 2.31.1.527.g47e6f16901


      reply	other threads:[~2021-04-23 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 19:22 [PATCH] uio/uio_pci_generic: fix return value changed in refactoring Martin Ågren
2021-04-23 20:28 ` Michael S. Tsirkin [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=20210423162757-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.agren@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).