mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
UPSTREAM: [media] lirc_dev: do not use goto to create loops
... use "do .. while" instead.
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 7fe579d29f)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
@@ -99,18 +99,16 @@ static int lirc_add_to_buf(struct irctl *ir)
|
||||
{
|
||||
if (ir->d.add_to_buf) {
|
||||
int res = -ENODATA;
|
||||
int got_data = 0;
|
||||
int got_data = -1;
|
||||
|
||||
/*
|
||||
* service the device as long as it is returning
|
||||
* data and we have space
|
||||
*/
|
||||
get_data:
|
||||
res = ir->d.add_to_buf(ir->d.data, ir->buf);
|
||||
if (res == 0) {
|
||||
do {
|
||||
got_data++;
|
||||
goto get_data;
|
||||
}
|
||||
res = ir->d.add_to_buf(ir->d.data, ir->buf);
|
||||
} while (!res);
|
||||
|
||||
if (res == -ENODEV)
|
||||
kthread_stop(ir->task);
|
||||
|
||||
Reference in New Issue
Block a user