From: Bjorn Helgaas Date: Wed, 20 Jun 2012 22:41:16 +0000 (-0600) Subject: PCI: remove useless pcix_set_mmrbc() dev->bus check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=809a3bf9f34cb6d0c0383b31b3495fa1ed3508a6;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git PCI: remove useless pcix_set_mmrbc() dev->bus check For a valid pci_dev, dev->bus != NULL always, so remove this unnecessary test. Found by Coverity (CID 101680). Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b9e93cf1eb40..7f1310e58534 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -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;