Skip to content

Commit

Permalink
media: staging/imx: Fix uninitialized variable warning
Browse files Browse the repository at this point in the history
The ret variable can be returned uninitialized in the
imx_media_create_pad_vdev_lists() function is imxmd->num_vdevs is zero.
Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Sep 23, 2017
1 parent 9b62ccd commit 81b79c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/imx/imx-media-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,10 @@ static int imx_media_create_pad_vdev_lists(struct imx_media_dev *imxmd)
struct media_link, list);
ret = imx_media_add_vdev_to_pad(imxmd, vdev, link->source);
if (ret)
break;
return ret;
}

return ret;
return 0;
}

/* async subdev complete notifier */
Expand Down

0 comments on commit 81b79c7

Please sign in to comment.