msm: 8974-tsens: Fix bugs in error handling

Calling kfree() on memory allocated by devm_kzalloc() is erroneous.
Don't do that.

In addition, due to the non-standard way of initializing this
device, interrupts are not requested until after probe time, and
thus it's not reasonable to free_irq() during probe().

This driver needs a overhall to fix the incorrect multi-tiered
initialization sequence. All resource requests should happen in probe()
only, and not in any initcall callback. This will be done in a
future change.

Change-Id: Ic04b1be71c4ec6817305fc8a833902363114e28c
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
1 file changed