Commit 8a8c942
gpio: cdev: Fix resource leaks on errors in gpiolib_cdev_register()
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>1 parent 70b3c28 commit 8a8c942
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2797 | 2797 | | |
2798 | 2798 | | |
2799 | 2799 | | |
2800 | | - | |
| 2800 | + | |
| 2801 | + | |
2801 | 2802 | | |
| 2803 | + | |
2802 | 2804 | | |
2803 | 2805 | | |
2804 | 2806 | | |
2805 | | - | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
2806 | 2810 | | |
| 2811 | + | |
2807 | 2812 | | |
2808 | 2813 | | |
2809 | 2814 | | |
| |||
0 commit comments