summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>2024-12-11 12:08:03 +0900
committerWolfram Sang <wsa+renesas@sang-engineering.com>2025-01-09 11:02:31 +0100
commit3f8c4f5e9a57868fa107016c81165686d23325f2 (patch)
tree0326ee515352a0a63c1be43579ff84160659de8e /tools/perf/scripts/python/libxed.py
parent9d89551994a430b50c4fffcb1e617a057fa76e20 (diff)
i2c: core: fix reference leak in i2c_register_adapter()
The reference count of the device incremented in device_initialize() is not decremented when device_add() fails. Add a put_device() call before returning from the function. This bug was found by an experimental static analysis tool that I am developing. Fixes: 60f68597024d ("i2c: core: Setup i2c_adapter runtime-pm before calling device_add()") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions