mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 04:29:11 -04:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL+ */
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
|
||||
/*
|
||||
* AMD FCH gpio driver platform-data
|
||||
|
||||
Reference in New Issue
Block a user