Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[deliverable/linux.git] / drivers / hwmon / gpio-fan.c
index 4e04c1228e51e56bac4740051d8466dd150d1c9c..39781945a5d236152c3668f040ef670a25b75a6e 100644 (file)
@@ -422,7 +422,7 @@ static int gpio_fan_get_of_pdata(struct device *dev,
 
        /* Fill GPIO pin array */
        pdata->num_ctrl = of_gpio_count(node);
-       if (!pdata->num_ctrl) {
+       if (pdata->num_ctrl <= 0) {
                dev_err(dev, "gpios DT property empty / missing");
                return -ENODEV;
        }
@@ -477,7 +477,7 @@ static int gpio_fan_get_of_pdata(struct device *dev,
        pdata->speed = speed;
 
        /* Alarm GPIO if one exists */
-       if (of_gpio_named_count(node, "alarm-gpios")) {
+       if (of_gpio_named_count(node, "alarm-gpios") > 0) {
                struct gpio_fan_alarm *alarm;
                int val;
                enum of_gpio_flags flags;
This page took 0.037712 seconds and 5 git commands to generate.