mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
leds: aw2013_led: fix issue led->vdd/vcc is NULL
kernel panic from as the led->vdd passed from the aw2013_power_on is NULL hence panic. vdd/vcc instance are only assigned to red led, need to use the led instance in pdata to make sure the vdd/vcc instances are valid. Change-Id: I908feffa52194b5f4502200bf13e911e0ddbb933 Signed-off-by: Mao Li <maol@codeaurora.org>
This commit is contained in:
parent
b0e84d7645
commit
bcc30de793
1 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ static void aw2013_brightness_work(struct work_struct *work)
|
|||
|
||||
/* enable regulators if they are disabled */
|
||||
if (!led->pdata->led->poweron) {
|
||||
if (aw2013_power_on(led, true)) {
|
||||
if (aw2013_power_on(led->pdata->led, true)) {
|
||||
dev_err(&led->pdata->led->client->dev, "power on failed");
|
||||
return;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ static void aw2013_led_blink_set(struct aw2013_led *led, unsigned long blinking)
|
|||
|
||||
/* enable regulators if they are disabled */
|
||||
if (!led->pdata->led->poweron) {
|
||||
if (aw2013_power_on(led, true)) {
|
||||
if (aw2013_power_on(led->pdata->led, true)) {
|
||||
dev_err(&led->pdata->led->client->dev, "power on failed");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue