diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2015-12-11 15:16:33 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:19:09 -0200 |
commit | 1488eee3b46736eefd9aec1e9d944f7a828773b9 (patch) | |
tree | fcc1b29362007e97c8e92ef6c74fce1205a3eb45 | |
parent | d8a2cf41cc1c1b4af35eaf0414f83653b7b17c8b (diff) |
[media] v4l: vsp1: use else if instead of continue when creating links
The for loop in the vsp1_create_entities() function that create the links,
checks the entity type and call the proper link creation function but then
it uses continue to force the next iteration of the loop to take place and
skipping code in between that creates links for different entities types.
It is more readable and easier to understand if the if else constructs is
used instead of the continue statement.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_drv.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index 4209d8615f72..0b251147bfff 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -264,19 +264,15 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) ret = vsp1_wpf_create_links(vsp1, entity); if (ret < 0) goto done; - continue; - } - - if (entity->type == VSP1_ENTITY_RPF) { + } else if (entity->type == VSP1_ENTITY_RPF) { ret = vsp1_rpf_create_links(vsp1, entity); if (ret < 0) goto done; - continue; + } else { + ret = vsp1_create_links(vsp1, entity); + if (ret < 0) + goto done; } - - ret = vsp1_create_links(vsp1, entity); - if (ret < 0) - goto done; } if (vsp1->pdata.features & VSP1_HAS_LIF) { |