Re: [PATCH 4/8] WmT: m-5mols_core style pad handling for adv7604

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

 



First of all, this subject puzzles me... What means WmT ??

2015-01-29 17:19 GMT+01:00 William Towle <william.towle@xxxxxxxxxxxxxxx>:
> ---
>  drivers/media/i2c/adv7604.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)

Again, it it passing checkpatch without signed-off-by ? And a little
description does not hurt :).

> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index 30bbd9d..6ed9303 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -1976,7 +1976,11 @@ static int adv7604_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>         if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
>                 struct v4l2_mbus_framefmt *fmt;
>
> -               fmt = v4l2_subdev_get_try_format(fh, format->pad);
> +               fmt = (fh == NULL) ? NULL
> +                       : v4l2_subdev_get_try_format(fh, format->pad);
> +               if (fmt == NULL)
> +                       return EINVAL;
> +

Mmmh, Hans probably has an explanation on this, I just don't get a use
case where fh can be NULL... So can't see the point of this patch ?

>                 format->format.code = fmt->code;
>         } else {
>                 format->format.code = state->format->code;
> @@ -2008,7 +2012,11 @@ static int adv7604_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
>         if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
>                 struct v4l2_mbus_framefmt *fmt;
>
> -               fmt = v4l2_subdev_get_try_format(fh, format->pad);
> +               fmt = (fh == NULL) ? NULL
> +                       : v4l2_subdev_get_try_format(fh, format->pad);
> +               if (fmt == NULL)
> +                       return -EINVAL;
> +
>                 fmt->code = format->format.code;
>         } else {
>                 state->format = info;

Same comment as above.
Thanks,
JM
--
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