aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index bcf9b9914fb7..c5f650095faa 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1187,8 +1187,8 @@ EXPORT_SYMBOL_GPL(gpiochip_find);
1187 1187
1188#ifdef CONFIG_PINCTRL 1188#ifdef CONFIG_PINCTRL
1189 1189
1190void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, 1190int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
1191 unsigned int pin_base, unsigned int npins) 1191 unsigned int pin_base, unsigned int npins)
1192{ 1192{
1193 struct gpio_pin_range *pin_range; 1193 struct gpio_pin_range *pin_range;
1194 1194
@@ -1196,7 +1196,7 @@ void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
1196 if (!pin_range) { 1196 if (!pin_range) {
1197 pr_err("%s: GPIO chip: failed to allocate pin ranges\n", 1197 pr_err("%s: GPIO chip: failed to allocate pin ranges\n",
1198 chip->label); 1198 chip->label);
1199 return; 1199 return -ENOMEM;
1200 } 1200 }
1201 1201
1202 pin_range->range.name = chip->label; 1202 pin_range->range.name = chip->label;
@@ -1207,6 +1207,8 @@ void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
1207 &pin_range->range); 1207 &pin_range->range);
1208 1208
1209 list_add_tail(&pin_range->node, &chip->pin_ranges); 1209 list_add_tail(&pin_range->node, &chip->pin_ranges);
1210
1211 return 0;
1210} 1212}
1211EXPORT_SYMBOL_GPL(gpiochip_add_pin_range); 1213EXPORT_SYMBOL_GPL(gpiochip_add_pin_range);
1212 1214