summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2015-04-07 20:14:44 +0300
committerAlex Williamson <alex.williamson@redhat.com>2015-04-07 20:14:44 +0300
commit561d72ddbbe480e2cae6c1a63c688986586ef2b1 (patch)
tree08dce63e805fd681d1d96e6aebac630d4bd85cee /drivers
parent80c7e8cc2aaa36944acdfbce46f373101b9f21ff (diff)
downloadlinux-561d72ddbbe480e2cae6c1a63c688986586ef2b1.tar.xz
vfio-pci: Remove warning if try-reset fails
As indicated in the comment, this is not entirely uncommon and causes user concern for no reason. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vfio/pci/vfio_pci.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 43517ce930f2..d0f1e7026d5d 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -217,14 +217,8 @@ static void vfio_pci_disable(struct vfio_pci_device *vdev)
* Try to reset the device. The success of this is dependent on
* being able to lock the device, which is not always possible.
*/
- if (vdev->reset_works) {
- int ret = pci_try_reset_function(pdev);
- if (ret)
- pr_warn("%s: Failed to reset device %s (%d)\n",
- __func__, dev_name(&pdev->dev), ret);
- else
- vdev->needs_reset = false;
- }
+ if (vdev->reset_works && !pci_try_reset_function(pdev))
+ vdev->needs_reset = false;
pci_restore_state(pdev);
out: