power: qpnp-bms: Fix memory leaks when probe fails
There exists a memory leak when the qpnp-bms driver's probe function
fails after loading the battery data. Fix this by freeing that memory
in the error handling of the probe function. Similarly, free the same
memory if the driver is removed dynamically.
Change-Id: I074605f8b698ab780c9f7e90feede261d082b05f
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment