Re: [PATCH] [media] vpif_capture: fix condition logic in vpif_capture.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wei,

On Tue, Oct 30, 2012 at 7:15 PM, Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
>
> The pattern E == C1 && E == C2 is always false. This patch
> fix this according to the assumption that && should be ||.
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
>
> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> ---
>  drivers/media/platform/davinci/vpif_capture.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied to my tree with following commit message,
davinci: vpif_capture: fix return type check for v4l2_subdev_call()

The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().

The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Regards,
--Prabhakar Lad

> diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
> index fcabc02..2d28a96 100644
> --- a/drivers/media/platform/davinci/vpif_capture.c
> +++ b/drivers/media/platform/davinci/vpif_capture.c
> @@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv,
>         int ret;
>
>         ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings);
> -       if (ret == -ENOIOCTLCMD && ret == -ENODEV)
> +       if (ret == -ENOIOCTLCMD || ret == -ENODEV)
>                 return -EINVAL;
>         return ret;
>  }
> @@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv,
>         int ret;
>
>         ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings);
> -       if (ret == -ENOIOCTLCMD && ret == -ENODEV)
> +       if (ret == -ENOIOCTLCMD || ret == -ENODEV)
>                 return -ENODATA;
>         return ret;
>  }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux