OSDN Git Service

leds: qpnp-flash-v2: Fix some issues
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Mon, 3 Apr 2017 19:26:06 +0000 (12:26 -0700)
committerSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Mon, 3 Apr 2017 20:06:25 +0000 (13:06 -0700)
commitc3cd64df0ace7c4f458e357794a1f227376cc8eb
tree5085b3423bdf7b7927caa4d7852ed9ebd1a234ed
parent664cdd33f956accabebd29edba6c220b1580744d
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>
drivers/leds/leds-qpnp-flash-v2.c