Skip to content

Commit 3b55cb8

Browse files
committed
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
2 parents 9e98c67 + b45a02e commit 3b55cb8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

drivers/gpio/gpio-adnp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ static int adnp_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
132132
if (err < 0)
133133
goto out;
134134

135-
if (err & BIT(pos))
136-
err = -EACCES;
135+
if (value & BIT(pos)) {
136+
err = -EPERM;
137+
goto out;
138+
}
137139

138140
err = 0;
139141

drivers/gpio/gpio-exar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ static int gpio_exar_probe(struct platform_device *pdev)
148148
mutex_init(&exar_gpio->lock);
149149

150150
index = ida_simple_get(&ida_index, 0, 0, GFP_KERNEL);
151+
if (index < 0)
152+
goto err_destroy;
151153

152154
sprintf(exar_gpio->name, "exar_gpio%d", index);
153155
exar_gpio->gpio_chip.label = exar_gpio->name;

include/linux/platform_data/gpio/gpio-amd-fch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL+ */
1+
/* SPDX-License-Identifier: GPL-2.0+ */
22

33
/*
44
* AMD FCH gpio driver platform-data

0 commit comments

Comments
 (0)