|
@@ -1214,15 +1214,14 @@ int gpiochip_add(struct gpio_chip *chip)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ spin_unlock_irqrestore(&gpio_lock, flags);
|
|
|
+
|
|
|
#ifdef CONFIG_PINCTRL
|
|
|
INIT_LIST_HEAD(&chip->pin_ranges);
|
|
|
#endif
|
|
|
|
|
|
of_gpiochip_add(chip);
|
|
|
|
|
|
-unlock:
|
|
|
- spin_unlock_irqrestore(&gpio_lock, flags);
|
|
|
-
|
|
|
if (status)
|
|
|
goto fail;
|
|
|
|
|
@@ -1235,6 +1234,9 @@ unlock:
|
|
|
chip->label ? : "generic");
|
|
|
|
|
|
return 0;
|
|
|
+
|
|
|
+unlock:
|
|
|
+ spin_unlock_irqrestore(&gpio_lock, flags);
|
|
|
fail:
|
|
|
/* failures here can mean systems won't boot... */
|
|
|
pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n",
|