From f3d98d7df9d24f9166e49c54a78b3329f2c71252 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 21 Oct 2015 14:11:07 +0000 Subject: [PATCH] CID 1328433: Anding with 0 and comparing != 0 will not work very will. --- sys/dev/pci/agp_i810.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index 4289bed080ee..4373735f74f4 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.119 2015/10/13 12:17:04 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.120 2015/10/21 14:11:07 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.119 2015/10/13 12:17:04 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.120 2015/10/21 14:11:07 christos Exp $"); #include #include @@ -445,7 +445,7 @@ agp_i810_attach(device_t parent, device_t self, void *aux) */ mmadr_type = pci_mapreg_type(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag, mmadr_bar); - if ((mmadr_type & PCI_MAPREG_TYPE_MEM) != PCI_MAPREG_TYPE_MEM) { + if (PCI_MAPREG_TYPE(mmaddr_type) != PCI_MAPREG_TYPE_MEM) { aprint_error_dev(self, "non-memory device MMIO registers\n"); error = ENXIO; goto fail1;