forked from Minki/linux
ARM: pxa/am200epd: fix leak in am200_init_gpio_regs error path
If gpio_request fails when i > 0, gpios[0] is not freed in current implementation. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
parent
e3b1ceedf7
commit
8aad172e6c
@ -128,8 +128,8 @@ static int am200_init_gpio_regs(struct metronomefb_par *par)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_req_gpio:
|
err_req_gpio:
|
||||||
while (i > 0)
|
while (--i >= 0)
|
||||||
gpio_free(gpios[i--]);
|
gpio_free(gpios[i]);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user