aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2022-07-20 17:09:33 +0200
committerWolfram Sang <[email protected]>2022-08-21 10:27:33 +0200
commitd98bdd3a5b50446d8e010be5b04ce81c4eabf728 (patch)
treee422c6b366d11f3d8e99484c850ebfd0a09de63f /tools/perf/util/trace-event-scripting.c
parent3df71d7064cbb19a3ac0e5dc25ece2bbf3a4d9af (diff)
i2c: imx: Make sure to unregister adapter on remove()
If for whatever reasons pm_runtime_resume_and_get() fails and .remove() is exited early, the i2c adapter stays around and the irq still calls its handler, while the driver data and the register mapping go away. So if later the i2c adapter is accessed or the irq triggers this results in havoc accessing freed memory and unmapped registers. So unregister the software resources even if resume failed, and only skip the hardware access in that case. Fixes: 588eb93ea49f ("i2c: imx: add runtime pm support to improve the performance") Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Oleksij Rempel <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions