Merge tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / drivers / gpio / gpio-sim.c
index 41c31b1..9810983 100644 (file)
@@ -314,8 +314,8 @@ static int gpio_sim_setup_sysfs(struct gpio_sim_chip *chip)
 
        for (i = 0; i < num_lines; i++) {
                attr_group = devm_kzalloc(dev, sizeof(*attr_group), GFP_KERNEL);
-               attrs = devm_kcalloc(dev, sizeof(*attrs),
-                                    GPIO_SIM_NUM_ATTRS, GFP_KERNEL);
+               attrs = devm_kcalloc(dev, GPIO_SIM_NUM_ATTRS, sizeof(*attrs),
+                                    GFP_KERNEL);
                val_attr = devm_kzalloc(dev, sizeof(*val_attr), GFP_KERNEL);
                pull_attr = devm_kzalloc(dev, sizeof(*pull_attr), GFP_KERNEL);
                if (!attr_group || !attrs || !val_attr || !pull_attr)