diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2025-10-28 17:47:47 +0800 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2025-10-28 17:04:34 +0100 |
| commit | cdf44f1add4ec9ee80569d5a43e6e9bba0d74c7a (patch) | |
| tree | 8216453792e13c07e710aa6b04c6f758a1e96035 /tools/lib/python/kdoc/kdoc_output.py | |
| parent | 2052c1e59b34ae59d0eec460b70c5681cead76e8 (diff) | |
mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove
The driver calls gpiod_get_optional() in the probe function but
never calls gpiod_put() in the remove function or in the probe
error path. This leads to a GPIO descriptor resource leak.
The lpc32xx_mlc.c driver in the same directory handles this
correctly by calling gpiod_put() on both paths.
Add gpiod_put() in the remove function and in the probe error path
to fix the resource leak.
Fixes: 6b923db2867c ("mtd: rawnand: lpc32xx_slc: switch to using gpiod API")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions
