Module Name:    src
Committed By:   joerg
Date:           Wed May  7 19:30:09 UTC 2014

Modified Files:
        src/sys/dev/pci: joy_pci.c

Log Message:
Fix impossible error condition.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/joy_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/joy_pci.c
diff -u src/sys/dev/pci/joy_pci.c:1.20 src/sys/dev/pci/joy_pci.c:1.21
--- src/sys/dev/pci/joy_pci.c:1.20	Mon Jan 30 19:41:22 2012
+++ src/sys/dev/pci/joy_pci.c	Wed May  7 19:30:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: joy_pci.c,v 1.20 2012/01/30 19:41:22 drochner Exp $	*/
+/*	$NetBSD: joy_pci.c,v 1.21 2014/05/07 19:30:09 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_pci.c,v 1.20 2012/01/30 19:41:22 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_pci.c,v 1.21 2014/05/07 19:30:09 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -113,8 +113,8 @@ joy_pci_attach(device_t parent, device_t
 	}
 
 	if (mapsize != 2) {
-		if (!bus_space_subregion(sc->sc_iot, sc->sc_ioh, 1, 1,
-		    &sc->sc_ioh) < 0) {
+		if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, 1, 1,
+		    &sc->sc_ioh)) {
 			aprint_error_dev(self, "error mapping subregion\n");
 			return;
 		}

Reply via email to