diff options
| author | Uwe Kleine-König <[email protected]> | 2022-06-21 06:40:36 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2022-06-23 14:42:27 +0000 |
| commit | c1c2a15c2b5379ea8e44dcdcc298e3de42076ba0 (patch) | |
| tree | c3f483f65ccb9dbe9204dfc13cc3f415f0486e9f /scripts/clang-tools/gen_compile_commands.py | |
| parent | gpio: winbond: Fix error code in winbond_gpio_get() (diff) | |
| download | kernel-c1c2a15c2b5379ea8e44dcdcc298e3de42076ba0.tar.gz kernel-c1c2a15c2b5379ea8e44dcdcc298e3de42076ba0.zip | |
gpio: grgpio: Fix device removing
If a platform device's remove callback returns non-zero, the device core
emits a warning and still removes the device and calls the devm cleanup
callbacks.
So it's not save to not unregister the gpiochip because on the next request
to a GPIO the driver accesses kfree()'d memory. Also if an IRQ triggers,
the freed memory is accessed.
Instead rely on the GPIO framework to ensure that after gpiochip_remove()
all GPIOs are freed and so the corresponding IRQs are unmapped.
This is a preparation for making platform remove callbacks return void.
Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions
