aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.c
diff options
context:
space:
mode:
authorHans de Goede <[email protected]>2021-10-31 16:25:22 +0100
committerSebastian Reichel <[email protected]>2021-11-02 13:47:19 +0100
commitcdf10ffe8f626d8a2edc354abf063df0078b2d71 (patch)
tree235c1a94f992b9de6b8b2c815e0c48ab4c056cb3 /drivers/usb/cdns3/cdns3-trace.c
parent172d0ccea55ce69718bac693d2ea9341fb61b6c7 (diff)
power: supply: bq27xxx: Fix kernel crash on IRQ handler register error
When registering the IRQ handler fails, do not just return the error code, this will free the devm_kzalloc()-ed data struct while leaving the queued work queued and the registered power_supply registered with both of them now pointing to free-ed memory, resulting in various kernel crashes soon afterwards. Instead properly tear-down things on IRQ handler register errors. Fixes: 703df6c09795 ("power: bq27xxx_battery: Reorganize I2C into a module") Cc: Andrew F. Davis <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions