As reported by gcc:
+ drivers/staging/media/imx/imx-media-csi.c: warning: variable 'input_fi' set but not used [-Wunused-but-set-variable]: => 671:33
+ drivers/staging/media/imx/imx-media-csi.c: warning: variable 'pinctrl' set but not used [-Wunused-but-set-variable]: => 1742:18
input_fi is not used, so just remove it.
However, pinctrl should be used, as it devm_pinctrl_get_select_default()
is declared with attribute warn_unused_result. What's missing there
is an error handling code, in case it fails. Add it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
static int csi_start(struct csi_priv *priv)
{
- struct v4l2_fract *output_fi, *input_fi;
+ struct v4l2_fract *output_fi;
int ret;
output_fi = &priv->frame_interval[priv->active_output_pad];
- input_fi = &priv->frame_interval[CSI_SINK_PAD];
if (priv->dest == IPU_CSI_DEST_IDMAC) {
ret = csi_idmac_start(priv);
*/
priv->dev->of_node = pdata->of_node;
pinctrl = devm_pinctrl_get_select_default(priv->dev);
+ if (IS_ERR(pinctrl)) {
+ ret = PTR_ERR(priv->vdev);
+ goto free;
+ }
ret = v4l2_async_register_subdev(&priv->sd);
if (ret)