Skip to content

Commit

Permalink
media: ti-vpe: cal: fix error handling in cal_camerarx_create
Browse files Browse the repository at this point in the history
[ Upstream commit 918d6d1 ]

cal_camerarx_create() doesn't handle error returned from
cal_camerarx_sd_init_cfg(). Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tomba authored and gregkh committed Sep 18, 2021
1 parent 94bf4cd commit ef69054
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/platform/ti-vpe/cal-camerarx.c
Expand Up @@ -845,7 +845,9 @@ struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
if (ret)
goto error;

cal_camerarx_sd_init_cfg(sd, NULL);
ret = cal_camerarx_sd_init_cfg(sd, NULL);
if (ret)
goto error;

ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);
if (ret)
Expand Down

0 comments on commit ef69054

Please sign in to comment.