From: Dan Carpenter <dan.carpenter@oracle.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Christoph Hellwig <hch@lst.de>
Cc: linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] PCI: fix pci_try_reset_function()
Date: Mon, 03 Jul 2017 11:09:19 +0000 [thread overview]
Message-ID: <20170701135323.x5vaj4e2wcs2mcro@mwanda> (raw)
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);
next reply other threads:[~2017-07-03 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 11:09 Dan Carpenter [this message]
2017-07-03 13:00 ` [PATCH] PCI: fix pci_try_reset_function() 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=20170701135323.x5vaj4e2wcs2mcro@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-pci@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