mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err
with the "for (; i != 0; i--)" sytax, i-- will be executed after the iteration. thus dev_err shows wrong i value. Switch to "while(--i >= 0)" which is better in readability. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Grant Likely <[email protected]>
This commit is contained in:
parent
a57339b4b5
commit
33300571b1
1 changed files with 1 additions and 1 deletions
|
|
@ -233,7 +233,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev,
|
|||
return 0;
|
||||
|
||||
err_gpiochip_add:
|
||||
for (; i != 0; i--) {
|
||||
while (--i >= 0) {
|
||||
chip--;
|
||||
ret = gpiochip_remove(&chip->gpio);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue