regulator: max8952 - fix wrong gpio valid check
[pandora-kernel.git] / drivers / regulator / max8952.c
index daff7fd..486ed81 100644 (file)
@@ -139,7 +139,7 @@ static int max8952_set_voltage(struct regulator_dev *rdev,
        s8 vid = -1, i;
 
        if (!gpio_is_valid(max8952->pdata->gpio_vid0) ||
-                       !gpio_is_valid(max8952->pdata->gpio_vid0)) {
+                       !gpio_is_valid(max8952->pdata->gpio_vid1)) {
                /* DVS not supported */
                return -EPERM;
        }