diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2019-03-23 02:25:00 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2019-03-23 02:25:00 -0400 |
| commit | 3b55cb88c3898239ebbca86372ece1d145013010 (patch) | |
| tree | 33a534d71b93b4ff9fc9173b87427b3ca32d5bc6 /drivers | |
| parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) | |
| parent | b45a02e13ee74b6fde56df4d76786058821a3aba (diff) | |
Merge tag 'gpio-5.1-rc2-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
GPIO fixes for v5.1-rc2
- check the return value of a function that can fail in gpio-exar
- fix the SPDX identifier in amd-fch
- fix the direction_input callback in gpio-adnp
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpio/gpio-adnp.c | 6 | ||||
| -rw-r--r-- | drivers/gpio/gpio-exar.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c index 91b90c0cea73..12acdac85820 100644 --- a/drivers/gpio/gpio-adnp.c +++ b/drivers/gpio/gpio-adnp.c | |||
| @@ -132,8 +132,10 @@ static int adnp_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | |||
| 132 | if (err < 0) | 132 | if (err < 0) |
| 133 | goto out; | 133 | goto out; |
| 134 | 134 | ||
| 135 | if (err & BIT(pos)) | 135 | if (value & BIT(pos)) { |
| 136 | err = -EACCES; | 136 | err = -EPERM; |
| 137 | goto out; | ||
| 138 | } | ||
| 137 | 139 | ||
| 138 | err = 0; | 140 | err = 0; |
| 139 | 141 | ||
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; |
