mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
media: vsp1: Fix smatch warning
drivers/media/platform/vsp1/vsp1_drm.c: drivers/media/platform/vsp1/vsp1_drm.c:336 vsp1_du_pipeline_setup_brx() error: we previously assumed 'pipe->brx' could be null (see line 244) smatch missed that if pipe->brx was NULL, then later on it will be set with a non-NULL value. But it is easier to just use the brx pointer so smatch doesn't get confused. Tested-on: Salvator-XS-ES2.0, Salvator-XS-M3N Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
0654cbcc8d
commit
5b6326b7ae
1 changed files with 3 additions and 3 deletions
|
@ -333,19 +333,19 @@ static int vsp1_du_pipeline_setup_brx(struct vsp1_device *vsp1,
|
||||||
* on the BRx sink pad 0 and propagated inside the entity, not on the
|
* on the BRx sink pad 0 and propagated inside the entity, not on the
|
||||||
* source pad.
|
* source pad.
|
||||||
*/
|
*/
|
||||||
format.pad = pipe->brx->source_pad;
|
format.pad = brx->source_pad;
|
||||||
format.format.width = drm_pipe->width;
|
format.format.width = drm_pipe->width;
|
||||||
format.format.height = drm_pipe->height;
|
format.format.height = drm_pipe->height;
|
||||||
format.format.field = V4L2_FIELD_NONE;
|
format.format.field = V4L2_FIELD_NONE;
|
||||||
|
|
||||||
ret = v4l2_subdev_call(&pipe->brx->subdev, pad, set_fmt, NULL,
|
ret = v4l2_subdev_call(&brx->subdev, pad, set_fmt, NULL,
|
||||||
&format);
|
&format);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dev_dbg(vsp1->dev, "%s: set format %ux%u (%x) on %s pad %u\n",
|
dev_dbg(vsp1->dev, "%s: set format %ux%u (%x) on %s pad %u\n",
|
||||||
__func__, format.format.width, format.format.height,
|
__func__, format.format.width, format.format.height,
|
||||||
format.format.code, BRX_NAME(pipe->brx), pipe->brx->source_pad);
|
format.format.code, BRX_NAME(brx), brx->source_pad);
|
||||||
|
|
||||||
if (format.format.width != drm_pipe->width ||
|
if (format.format.width != drm_pipe->width ||
|
||||||
format.format.height != drm_pipe->height) {
|
format.format.height != drm_pipe->height) {
|
||||||
|
|
Loading…
Reference in a new issue