diff --git a/sys/dev/gpio/ofw_gpiobus.c b/sys/dev/gpio/ofw_gpiobus.c
index f8fcbea95078..1f98d7cad2a3 100644
--- a/sys/dev/gpio/ofw_gpiobus.c
+++ b/sys/dev/gpio/ofw_gpiobus.c
@@ -178,9 +178,10 @@ gpio_pin_is_active(gpio_pin_t pin, bool *active)
 		return (rv);
 	}
 
-	*active = tmp != 0;
 	if (pin->flags & GPIO_ACTIVE_LOW)
-		*active = !(*active);
+		*active = tmp == 0;
+	else
+		*active = tmp != 0;
 	return (0);
 }