media: imx: Don't initialize vars that won't be used
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>
This commit is contained in:
Родитель
225fe212a2
Коммит
52e17089d1
|
@ -668,11 +668,10 @@ static int csi_setup(struct csi_priv *priv)
|
|||
|
||||
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);
|
||||
|
@ -1797,6 +1796,10 @@ static int imx_csi_probe(struct platform_device *pdev)
|
|||
*/
|
||||
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче