All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Po Liu <po.liu@nxp.com>
Cc: linux-pci@vger.kernel.org, Roy Zang <roy.zang@nxp.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Stuart Yoder <stuart.yoder@nxp.com>,
	Yang-Leo Li <leoyang.li@nxp.com>,
	linux-arm-kernel@lists.infradead.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	Mingkai Hu <mingkai.hu@nxp.com>
Subject: Re: [PATCH v1] iov: add return failure condition for pci_setup_device
Date: Mon, 12 Sep 2016 16:44:32 -0500	[thread overview]
Message-ID: <20160912214432.GD23532@localhost> (raw)
In-Reply-To: <1472455681-18827-1-git-send-email-po.liu@nxp.com>

On Mon, Aug 29, 2016 at 03:28:01PM +0800, Po Liu wrote:
> If pci_setup_device() return failure, return failure directly in the
> pci_iov_add_virtfn().
> 
> Signed-off-by: Po Liu <po.liu@nxp.com>

Applied to pci/virtualization for v4.9, thanks!

> ---
>  drivers/pci/iov.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
> index 2194b44..e30f05c 100644
> --- a/drivers/pci/iov.c
> +++ b/drivers/pci/iov.c
> @@ -136,7 +136,10 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)
>  	virtfn->devfn = pci_iov_virtfn_devfn(dev, id);
>  	virtfn->vendor = dev->vendor;
>  	pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device);
> -	pci_setup_device(virtfn);
> +	rc = pci_setup_device(virtfn);
> +	if (rc)
> +		goto failed0;
> +
>  	virtfn->dev.parent = dev->dev.parent;
>  	virtfn->physfn = pci_dev_get(dev);
>  	virtfn->is_virtfn = 1;
> -- 
> 2.1.0.27.g96db324
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: helgaas@kernel.org (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] iov: add return failure condition for pci_setup_device
Date: Mon, 12 Sep 2016 16:44:32 -0500	[thread overview]
Message-ID: <20160912214432.GD23532@localhost> (raw)
In-Reply-To: <1472455681-18827-1-git-send-email-po.liu@nxp.com>

On Mon, Aug 29, 2016 at 03:28:01PM +0800, Po Liu wrote:
> If pci_setup_device() return failure, return failure directly in the
> pci_iov_add_virtfn().
> 
> Signed-off-by: Po Liu <po.liu@nxp.com>

Applied to pci/virtualization for v4.9, thanks!

> ---
>  drivers/pci/iov.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
> index 2194b44..e30f05c 100644
> --- a/drivers/pci/iov.c
> +++ b/drivers/pci/iov.c
> @@ -136,7 +136,10 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)
>  	virtfn->devfn = pci_iov_virtfn_devfn(dev, id);
>  	virtfn->vendor = dev->vendor;
>  	pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device);
> -	pci_setup_device(virtfn);
> +	rc = pci_setup_device(virtfn);
> +	if (rc)
> +		goto failed0;
> +
>  	virtfn->dev.parent = dev->dev.parent;
>  	virtfn->physfn = pci_dev_get(dev);
>  	virtfn->is_virtfn = 1;
> -- 
> 2.1.0.27.g96db324
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2016-09-12 21:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29  7:28 [PATCH v1] iov: add return failure condition for pci_setup_device Po Liu
2016-08-29  7:28 ` Po Liu
2016-09-12 21:44 ` Bjorn Helgaas [this message]
2016-09-12 21:44   ` Bjorn Helgaas

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=20160912214432.GD23532@localhost \
    --to=helgaas@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingkai.hu@nxp.com \
    --cc=po.liu@nxp.com \
    --cc=roy.zang@nxp.com \
    --cc=stuart.yoder@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.