Commit ee56fa01 authored by Deepak R Varma's avatar Deepak R Varma Committed by Mauro Carvalho Chehab

media: staging: media: imx: change imx_media_fim_set_stream() to return void

At present, the function imx_media_fim_set_stream() always returns 0.
So, convert it to be a function returning void instead. Issue identified
using the returnvar.cocci Coccinelle semantic patch.
Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Reviewed-by: default avatarMarco Felsch <m.felsch@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 29bd4267
...@@ -779,11 +779,8 @@ static int csi_start(struct csi_priv *priv) ...@@ -779,11 +779,8 @@ static int csi_start(struct csi_priv *priv)
goto idmac_stop; goto idmac_stop;
/* start the frame interval monitor */ /* start the frame interval monitor */
if (priv->fim && priv->dest == IPU_CSI_DEST_IDMAC) { if (priv->fim && priv->dest == IPU_CSI_DEST_IDMAC)
ret = imx_media_fim_set_stream(priv->fim, output_fi, true); imx_media_fim_set_stream(priv->fim, output_fi, true);
if (ret)
goto idmac_stop;
}
ret = ipu_csi_enable(priv->csi); ret = ipu_csi_enable(priv->csi);
if (ret) { if (ret) {
......
...@@ -368,12 +368,11 @@ void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp) ...@@ -368,12 +368,11 @@ void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp)
} }
/* Called by the subdev in its s_stream callback */ /* Called by the subdev in its s_stream callback */
int imx_media_fim_set_stream(struct imx_media_fim *fim, void imx_media_fim_set_stream(struct imx_media_fim *fim,
const struct v4l2_fract *fi, const struct v4l2_fract *fi,
bool on) bool on)
{ {
unsigned long flags; unsigned long flags;
int ret = 0;
v4l2_ctrl_lock(fim->ctrl[FIM_CL_ENABLE]); v4l2_ctrl_lock(fim->ctrl[FIM_CL_ENABLE]);
...@@ -393,7 +392,6 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, ...@@ -393,7 +392,6 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim,
fim->stream_on = on; fim->stream_on = on;
out: out:
v4l2_ctrl_unlock(fim->ctrl[FIM_CL_ENABLE]); v4l2_ctrl_unlock(fim->ctrl[FIM_CL_ENABLE]);
return ret;
} }
int imx_media_fim_add_controls(struct imx_media_fim *fim) int imx_media_fim_add_controls(struct imx_media_fim *fim)
......
...@@ -246,9 +246,9 @@ int imx_media_dev_notifier_register(struct imx_media_dev *imxmd, ...@@ -246,9 +246,9 @@ int imx_media_dev_notifier_register(struct imx_media_dev *imxmd,
/* imx-media-fim.c */ /* imx-media-fim.c */
struct imx_media_fim; struct imx_media_fim;
void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp); void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp);
int imx_media_fim_set_stream(struct imx_media_fim *fim, void imx_media_fim_set_stream(struct imx_media_fim *fim,
const struct v4l2_fract *frame_interval, const struct v4l2_fract *frame_interval,
bool on); bool on);
int imx_media_fim_add_controls(struct imx_media_fim *fim); int imx_media_fim_add_controls(struct imx_media_fim *fim);
struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd); struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd);
void imx_media_fim_free(struct imx_media_fim *fim); void imx_media_fim_free(struct imx_media_fim *fim);
......
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