diff options
author | Andi Shyti <andi.shyti@samsung.com> | 2016-07-06 06:01:18 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-13 15:01:13 -0300 |
commit | 7fe579d29f66e7dee77c50f39947a70a74929f4f (patch) | |
tree | 1de96b241646d07dc50b433f5deb34873731ea88 /drivers | |
parent | 54fcecafe5737d6987c2e6e203598e4dfb5112b0 (diff) | |
download | linux-7fe579d29f66e7dee77c50f39947a70a74929f4f.tar.bz2 |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index b11d02682d13..cfa6031eeb72 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -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); |