* [PATCH] PCI: fix pci_try_reset_function()
@ 2017-07-03 11:09 Dan Carpenter
2017-07-03 13:00 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-07-03 11:09 UTC (permalink / raw)
To: Bjorn Helgaas, Christoph Hellwig; +Cc: linux-pci, kernel-janitors
There is a reversed if condition so the function doesn't work.
Fixes: e94fae7aeef4 ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 5b49d662f996..3bf28bf04c3d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4269,7 +4269,7 @@ int pci_try_reset_function(struct pci_dev *dev)
if (rc)
return rc;
- if (pci_dev_trylock(dev))
+ if (!pci_dev_trylock(dev))
return -EAGAIN;
pci_dev_save_and_disable(dev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: fix pci_try_reset_function()
2017-07-03 11:09 [PATCH] PCI: fix pci_try_reset_function() Dan Carpenter
@ 2017-07-03 13:00 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-07-03 13:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: Bjorn Helgaas, Christoph Hellwig, linux-pci, kernel-janitors
On Mon, Jul 03, 2017 at 02:09:19PM +0300, Dan Carpenter wrote:
> There is a reversed if condition so the function doesn't work.
>
> Fixes: e94fae7aeef4 ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Folded into pci/virtualization, thanks!
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 5b49d662f996..3bf28bf04c3d 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4269,7 +4269,7 @@ int pci_try_reset_function(struct pci_dev *dev)
> if (rc)
> return rc;
>
> - if (pci_dev_trylock(dev))
> + if (!pci_dev_trylock(dev))
> return -EAGAIN;
>
> pci_dev_save_and_disable(dev);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-03 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 11:09 [PATCH] PCI: fix pci_try_reset_function() Dan Carpenter
2017-07-03 13:00 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox