power: qpnp-fg-gen3: Free the interrupt handlers in fg_cleanup

Currently, in fg_cleanup(), all the resources are freed up
including votables. However, there could be a potential race
condition where fg_cleanup() is called because of an undetermined
driver probe failure and an interrupt handler being run in
parallel which attempts to call vote().

In the scenario above, fg_cleanup() might end up in destroying
votable and the interrupt handler might end up in calling vote()
on the same votable. Fix this by freeing the interrupt handlers
under FG device first before destroying the votables.

Change-Id: I532cba9edd647385fc4787132820c6e846573dec
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
1 file changed