diff options
| author | Alexandre Belloni <[email protected]> | 2018-09-09 22:48:58 +0200 |
|---|---|---|
| committer | Lee Jones <[email protected]> | 2018-09-11 16:40:21 +0100 |
| commit | 9612f8f503804d2fd2f63aa6ba1e58bba4612d96 (patch) | |
| tree | 2e5fa8e95045ecc72252dbe21a67c4837b6bfc82 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
| parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) | |
mfd: menelaus: Fix possible race condition and leak
The IRQ work is added before the struct rtc is allocated and registered,
but this struct is used in the IRQ handler. This may lead to a NULL pointer
dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc
before calling menelaus_add_irq_work.
Also, this solves a possible leak as the RTC is never released.
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions