All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	hverkuil@xs4all.nl
Subject: Re: [PATCH 2/6] media: adv7183: Don't set format in sub-device state
Date: Thu, 7 Dec 2023 14:44:58 +0200	[thread overview]
Message-ID: <20231207124458.GD9675@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20231207120912.270716-3-sakari.ailus@linux.intel.com>

Hi Sakari,

Thank you for the patch.

On Thu, Dec 07, 2023 at 02:09:08PM +0200, Sakari Ailus wrote:
> For the purpose of setting old non-pad based sub-device try format as a
> basis for VIDIOC_TRY_FMT implementation, there is no need to set the
> format in the sub-device state. Drop the assignment to the state, which
> would result in a NULL pointer dereference.
> 
> Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  drivers/media/i2c/adv7183.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c
> index bcb99ba9a272..2a2cace4a153 100644
> --- a/drivers/media/i2c/adv7183.c
> +++ b/drivers/media/i2c/adv7183.c
> @@ -442,8 +442,6 @@ static int adv7183_set_fmt(struct v4l2_subdev *sd,
>  	}
>  	if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
>  		decoder->fmt = *fmt;
> -	else
> -		*v4l2_subdev_state_get_format(sd_state, 0) = *fmt;
>  	return 0;
>  }
>  

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-12-07 12:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 12:09 [PATCH 0/6] Old non-MC-aware drivers have no sub-device state Sakari Ailus
2023-12-07 12:09 ` [PATCH 1/6] media: saa6752hs: Don't set format in " Sakari Ailus
2023-12-07 12:44   ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 2/6] media: adv7183: " Sakari Ailus
2023-12-07 12:44   ` Laurent Pinchart [this message]
2023-12-07 12:09 ` [PATCH 3/6] media: mt9t112: " Sakari Ailus
2023-12-07 12:45   ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 4/6] media: rj54n1cb0c: " Sakari Ailus
2023-12-07 12:45   ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 5/6] media: tw9910: " Sakari Ailus
2023-12-07 12:45   ` Laurent Pinchart
2023-12-07 12:09 ` [PATCH 6/6] media: ov9640: " Sakari Ailus
2023-12-07 12:46   ` Laurent Pinchart
2023-12-07 12:48 ` [PATCH 0/6] Old non-MC-aware drivers have no " Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231207124458.GD9675@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.