Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202190
b: refs/heads/master
c: 1796b98
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Dmitry Torokhov committed Jun 28, 2010
1 parent 6334db5 commit f7de896
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28ed684fa3c0a75b59a00e209afef98aff7fa617
refs/heads/master: 1796b983cc4cbbed5e9e478b03591609a2c21987
12 changes: 7 additions & 5 deletions trunk/drivers/input/keyboard/lm8323.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ static int __devinit lm8323_probe(struct i2c_client *client,
struct lm8323_platform_data *pdata = client->dev.platform_data;
struct input_dev *idev;
struct lm8323_chip *lm;
int pwm;
int i, err;
unsigned long tmo;
u8 data[2];
Expand Down Expand Up @@ -710,8 +711,9 @@ static int __devinit lm8323_probe(struct i2c_client *client,
goto fail1;
}

for (i = 0; i < LM8323_NUM_PWMS; i++) {
err = init_pwm(lm, i + 1, &client->dev, pdata->pwm_names[i]);
for (pwm = 0; pwm < LM8323_NUM_PWMS; pwm++) {
err = init_pwm(lm, pwm + 1, &client->dev,
pdata->pwm_names[pwm]);
if (err < 0)
goto fail2;
}
Expand Down Expand Up @@ -764,9 +766,9 @@ static int __devinit lm8323_probe(struct i2c_client *client,
fail3:
device_remove_file(&client->dev, &dev_attr_disable_kp);
fail2:
while (--i >= 0)
if (lm->pwm[i].enabled)
led_classdev_unregister(&lm->pwm[i].cdev);
while (--pwm >= 0)
if (lm->pwm[pwm].enabled)
led_classdev_unregister(&lm->pwm[pwm].cdev);
fail1:
input_free_device(idev);
kfree(lm);
Expand Down

0 comments on commit f7de896

Please sign in to comment.