Skip to content

Commit

Permalink
media: camss: vfe: Don't call hw_version() before its dependencies ar…
Browse files Browse the repository at this point in the history
…e met

vfe->ops->hw_version(vfe) is being called before vfe->base has been
assigned, and before the hardware has been powered up.

Fixes: b10b533 ("media: camss: vfe: Don't read hardware version needlessly")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Robert Foss authored and Mauro Carvalho Chehab committed Sep 30, 2021
1 parent 936c7da commit 745b475
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/platform/qcom/camss/camss-vfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ static int vfe_get(struct vfe_device *vfe)
vfe_reset_output_maps(vfe);

vfe_init_outputs(vfe);

vfe->ops->hw_version(vfe);
} else {
ret = vfe_check_clock_rates(vfe);
if (ret < 0)
Expand Down Expand Up @@ -1299,7 +1301,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
return -EINVAL;
}
vfe->ops->subdev_init(dev, vfe);
vfe->ops->hw_version(vfe);

/* Memory */

Expand Down

0 comments on commit 745b475

Please sign in to comment.