diff options
| -rw-r--r-- | drivers/gpio/gpio-exar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c index 0ecd2369c2ca..a09d2f9ebacc 100644 --- a/drivers/gpio/gpio-exar.c +++ b/drivers/gpio/gpio-exar.c | |||
| @@ -148,6 +148,8 @@ static int gpio_exar_probe(struct platform_device *pdev) | |||
| 148 | mutex_init(&exar_gpio->lock); | 148 | mutex_init(&exar_gpio->lock); |
| 149 | 149 | ||
| 150 | index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL); | 150 | index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL); |
| 151 | if (index < 0) | ||
| 152 | goto err_destroy; | ||
| 151 | 153 | ||
| 152 | sprintf(exar_gpio->name, "exar_gpio%d", index); | 154 | sprintf(exar_gpio->name, "exar_gpio%d", index); |
| 153 | exar_gpio->gpio_chip.label = exar_gpio->name; | 155 | exar_gpio->gpio_chip.label = exar_gpio->name; |
