diff mbox series

[v6,01/40] ARM: ep93xx: Add terminator to gpiod_lookup_table

Message ID 20231212-ep93xx-v6-1-c307b8ac9aa8@maquefel.me (mailing list archive)
State New, archived
Headers show
Series [v6,01/40] ARM: ep93xx: Add terminator to gpiod_lookup_table | expand

Commit Message

Nikita Shubin via B4 Relay Dec. 12, 2023, 8:20 a.m. UTC
From: Nikita Shubin <nikita.shubin@maquefel.me>

Without the terminator, if a con_id is passed to gpio_find() that
does not exist in the lookup table the function will not stop looping
correctly, and eventually cause an oops.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 arch/arm/mach-ep93xx/core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko Dec. 13, 2023, 5:24 p.m. UTC | #1
On Tue, Dec 12, 2023 at 11:20:18AM +0300, Nikita Shubin wrote:
> Without the terminator, if a con_id is passed to gpio_find() that
> does not exist in the lookup table the function will not stop looping
> correctly, and eventually cause an oops.

Reported-by?
Fixes?
diff mbox series

Patch

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 71b113976420..8b1ec60a9a46 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -339,6 +339,7 @@  static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
 				GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
 		GPIO_LOOKUP_IDX("G", 0, NULL, 1,
 				GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+		{ }
 	},
 };