leds: qpnp-flash-v2: Fix some issues

An out of bounds access is attempted to calculate code for
iclamp_low_ma and iclamp_mid_ma for LED3. Use the right index in
flash_node pointer to fix it.

When an error is found during probe especially before registering
a flash LED class device, unregistering flash LED class devices
is made on a flash LED class device that is not registered yet.
Fix it.

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