Skip to content

Commit

Permalink
PCI: remove useless pcix_set_mmrbc() dev->bus check
Browse files Browse the repository at this point in the history
For a valid pci_dev, dev->bus != NULL always, so remove this
unnecessary test.

Found by Coverity (CID 101680).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Bjorn Helgaas committed Jun 20, 2012
1 parent dfb117b commit 809a3bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -3395,8 +3395,7 @@ int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)

o = (cmd & PCI_X_CMD_MAX_READ) >> 2;
if (o != v) {
if (v > o && dev->bus &&
(dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MMRBC))
if (v > o && (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MMRBC))
return -EIO;

cmd &= ~PCI_X_CMD_MAX_READ;
Expand Down

0 comments on commit 809a3bf

Please sign in to comment.