]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix incorrect vgaarb conditional in WARN_ON()
authorBjorn Helgaas <bhelgaas@google.com>
Sat, 5 Apr 2014 21:14:22 +0000 (15:14 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:19:06 +0000 (11:19 -0600)
commitffd18866abb4a2cb61ef65ae8e0c8ac7516a5f68
tree23c3dfa6a8a664116e33d5c74ee39e8ee96fe987
parent1c0afa5d7b5a356113425cfbc61037f72275eb7b
PCI: Fix incorrect vgaarb conditional in WARN_ON()

d0f9ce1f9b77 "vgaarb: use bridges to control VGA routing where possible"
added the "flags & PCI_VGA_STATE_CHANGE_DECODES" condition to an existing
WARN_ON(), but used bitwise AND (&) instead of logical AND (&&), so the
condition is never true.  Replace with logical AND.

Found by Coverity (CID 142811).

Fixes: d0f9ce1f9b77 "vgaarb: use bridges to control VGA routing where possible"
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: David Airlie <airlied@redhat.com>
drivers/pci/pci.c