PCI: Fix incorrect vgaarb conditional in WARN_ON()
authorBjorn Helgaas <bhelgaas@google.com>
Sat, 5 Apr 2014 21:14:22 +0000 (15:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:57:26 +0000 (18:57 -0700)
commitd3f891a0ab86ea6b43bd2133a9fac62e5b3581c0
tree77792115aa44067ebf0eea9a46dbf493377af405
parent9dcd32d499c30c31e9e634e4a54bb1f16ee84da4
PCI: Fix incorrect vgaarb conditional in WARN_ON()

commit 67ebd8140dc8923c65451fa0f6a8eee003c4dcd3 upstream.

3448a19da479 "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: 3448a19da479 "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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pci.c