aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-05-29 23:05:14 +0000
committersaturneric <[email protected]>2025-05-29 23:05:14 +0000
commitb7339b3a5fb4540417d07953e9b8c8f9dfdeffbf (patch)
tree0a6921bb90595d5b99c98eecf93921bbe57d7a0b /drivers/gpio/gpiolib.c
parentTracking torvalds/linux.git UNTIL 14. Mai. 2025 (diff)
parentLinux 6.15 (diff)
downloadkernel-b7339b3a5fb4540417d07953e9b8c8f9dfdeffbf.tar.gz
kernel-b7339b3a5fb4540417d07953e9b8c8f9dfdeffbf.zip
Merge tag 'v6.15'
Linux 6.15
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 33c27a167859..1c795e96a8b5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -745,6 +745,12 @@ EXPORT_SYMBOL_GPL(gpiochip_query_valid_mask);
bool gpiochip_line_is_valid(const struct gpio_chip *gc,
unsigned int offset)
{
+ /*
+ * hog pins are requested before registering GPIO chip
+ */
+ if (!gc->gpiodev)
+ return true;
+
/* No mask means all valid */
if (likely(!gc->gpiodev->valid_mask))
return true;