Skip to content
Commit b3b95964 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpio: cdev: check for NULL labels when sanitizing them for irqs

We need to take into account that a line's consumer label may be NULL
and not try to kstrdup() it in that case but rather pass the NULL
pointer up the stack to the interrupt request function.

To that end: let make_irq_label() return NULL as a valid return value
and use ERR_PTR() instead to signal an allocation failure to callers.

Cc: stable@vger.kernel.org
Fixes: b3449087

 ("gpio: cdev: sanitize the label before requesting the interrupt")
Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/lkml/20240402093534.212283-1-naresh.kamboju@linaro.org/
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
parent e8acd2d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment