regulator: max1586: Don't allocate memory for regulator_dev pointers
[firefly-linux-kernel-4.4.55.git] / drivers / regulator / max1586.c
index c2a40a1a9e3ed18f042ccbc5e51e078ecc22657c..d23d0577754ba64334659aba14fe6671aba2a38a 100644 (file)
@@ -165,8 +165,7 @@ static int max1586_pmic_probe(struct i2c_client *client,
        struct max1586_data *max1586;
        int i, id;
 
-       max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data) +
-                       sizeof(struct regulator_dev *) * (MAX1586_V6 + 1),
+       max1586 = devm_kzalloc(&client->dev, sizeof(struct max1586_data),
                        GFP_KERNEL);
        if (!max1586)
                return -ENOMEM;