]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: shared: verify con_id when adding proxy lookup
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 22 Dec 2025 10:01:27 +0000 (11:01 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 2 Jan 2026 09:34:31 +0000 (10:34 +0100)
commitcb0451e33be047fff7137f58d9996370e11fb344
tree82001c14df236e540fcb8aa736ef4c1dbb230886
parent9700b0fccf386b671e6f8401ddea6c5669cd0914
gpio: shared: verify con_id when adding proxy lookup

When matching the firmware node with the potential consumer, we
currently omit the con_id string. This can lead to false positives in
the unlikely case of the consumer having been assigned more than one
shared GPIO. Check the connector ID before proceeding.

Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Link: https://lore.kernel.org/r/20251222-gpio-shared-reset-gpio-proxy-v1-2-8d4bba7d8c14@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib-shared.c
drivers/gpio/gpiolib-shared.h
drivers/gpio/gpiolib.c