]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: cdev: Correct return code on memory allocation failure
authorTzung-Bi Shih <tzungbi@kernel.org>
Fri, 16 Jan 2026 08:10:18 +0000 (08:10 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:32:27 +0000 (10:32 +0100)
commit919f27eb24b0e82ea232379bec40a5a52e3483d9
tree1f7e89fa7df19e37dfd2267251cf03b6a227f895
parente7200b0a4b2a51c970b687f78f237f11cc7467a0
gpio: cdev: Correct return code on memory allocation failure

commit faff6846474e99295a139997f93ef6db222b5cee upstream.

-ENOMEM is a more appropriate return code for memory allocation
failures.  Correct it.

Cc: stable@vger.kernel.org
Fixes: 20bddcb40b2b ("gpiolib: cdev: replace locking wrappers for gpio_device with guards")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20260116081036.352286-6-tzungbi@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib-cdev.c