Skip to content

Commit

Permalink
Merge tag 'gpio-5.1-rc2-fixes-for-linus' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Walleij committed Mar 23, 2019
2 parents 9e98c67 + b45a02e commit 3b55cb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions drivers/gpio/gpio-adnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ static int adnp_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
if (err < 0)
goto out;

if (err & BIT(pos))
err = -EACCES;
if (value & BIT(pos)) {
err = -EPERM;
goto out;
}

err = 0;

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpio/gpio-exar.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ static int gpio_exar_probe(struct platform_device *pdev)
mutex_init(&exar_gpio->lock);

index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL);
if (index < 0)
goto err_destroy;

sprintf(exar_gpio->name, "exar_gpio%d", index);
exar_gpio->gpio_chip.label = exar_gpio->name;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/platform_data/gpio/gpio-amd-fch.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL+ */
/* SPDX-License-Identifier: GPL-2.0+ */

/*
* AMD FCH gpio driver platform-data
Expand Down

0 comments on commit 3b55cb8

Please sign in to comment.