Commit ceee7fb0 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: v4l: async: Avoid a goto in loop implementation

Replace a goto-based loop by a while loop.
Suggested-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 82bc596d
...@@ -820,20 +820,16 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd) ...@@ -820,20 +820,16 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
if (!v4l2_dev) if (!v4l2_dev)
continue; continue;
again: while ((asc = v4l2_async_find_match(notifier, sd))) {
asc = v4l2_async_find_match(notifier, sd); ret = v4l2_async_match_notify(notifier, v4l2_dev, sd,
if (!asc) asc);
continue;
ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asc);
if (ret) if (ret)
goto err_unbind; goto err_unbind;
ret = v4l2_async_nf_try_complete(notifier); ret = v4l2_async_nf_try_complete(notifier);
if (ret) if (ret)
goto err_unbind; goto err_unbind;
}
goto again;
} }
/* None matched, wait for hot-plugging */ /* None matched, wait for hot-plugging */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment