Commit ab140fc
gpio: cdev: Fix resource leaks on errors in gpiolib_cdev_register()
commit 8a8c942 upstream.
On error handling paths, gpiolib_cdev_register() doesn't free the
allocated resources which results leaks. Fix it.
Cc: stable@vger.kernel.org
Fixes: 7b9b77a ("gpiolib: add a per-gpio_device line state notification workqueue")
Fixes: d83cee3 ("gpio: protect the pointer to gpio_chip in gpio_device with SRCU")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20260120092650.2305319-1-tzungbi@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1641434 commit ab140fc
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2821 | 2821 | | |
2822 | 2822 | | |
2823 | 2823 | | |
2824 | | - | |
| 2824 | + | |
| 2825 | + | |
2825 | 2826 | | |
| 2827 | + | |
2826 | 2828 | | |
2827 | 2829 | | |
2828 | 2830 | | |
2829 | | - | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
2830 | 2834 | | |
| 2835 | + | |
2831 | 2836 | | |
2832 | 2837 | | |
2833 | 2838 | | |
| |||
0 commit comments