mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
media: v4l: async: Avoid a goto in loop implementation
Replace a goto-based loop by a while loop. Suggested-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
82bc596df8
commit
ceee7fb05b
|
|
@ -820,20 +820,16 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
|
|||
if (!v4l2_dev)
|
||||
continue;
|
||||
|
||||
again:
|
||||
asc = v4l2_async_find_match(notifier, sd);
|
||||
if (!asc)
|
||||
continue;
|
||||
while ((asc = v4l2_async_find_match(notifier, sd))) {
|
||||
ret = v4l2_async_match_notify(notifier, v4l2_dev, sd,
|
||||
asc);
|
||||
if (ret)
|
||||
goto err_unbind;
|
||||
|
||||
ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asc);
|
||||
if (ret)
|
||||
goto err_unbind;
|
||||
|
||||
ret = v4l2_async_nf_try_complete(notifier);
|
||||
if (ret)
|
||||
goto err_unbind;
|
||||
|
||||
goto again;
|
||||
ret = v4l2_async_nf_try_complete(notifier);
|
||||
if (ret)
|
||||
goto err_unbind;
|
||||
}
|
||||
}
|
||||
|
||||
/* None matched, wait for hot-plugging */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user