arm64: dts: rockchip: add the IPA needed parameters for rk3399 thermal
[firefly-linux-kernel-4.4.55.git] / drivers / gpio / gpio-max732x.c
index 7d3c90e9da71a313fcbac511097f159c80b15132..8c5252c6c327764cb6fc4ae99f321e2cdf830537 100644 (file)
@@ -685,9 +685,14 @@ static int max732x_probe(struct i2c_client *client,
 
        mutex_init(&chip->lock);
 
-       max732x_readb(chip, is_group_a(chip, 0), &chip->reg_out[0]);
-       if (nr_port > 8)
-               max732x_readb(chip, is_group_a(chip, 8), &chip->reg_out[1]);
+       ret = max732x_readb(chip, is_group_a(chip, 0), &chip->reg_out[0]);
+       if (ret)
+               goto out_failed;
+       if (nr_port > 8) {
+               ret = max732x_readb(chip, is_group_a(chip, 8), &chip->reg_out[1]);
+               if (ret)
+                       goto out_failed;
+       }
 
        ret = gpiochip_add(&chip->gpio_chip);
        if (ret)