aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2022-11-02 12:01:01 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2022-11-04 16:56:38 +0100
commit10b5ce6743c839fa75336042c64e2479caec9430 (patch)
tree0adc26f9969c300e86342ad7af3732ed16736261 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parent3a04d98608a0cee98b16e6640cff6237f9a7d03d (diff)
staging: media: tegra-video: fix chan->mipi value on error
chan->mipi takes the return value of tegra_mipi_request() which can be a valid pointer or an error. However chan->mipi is checked in several places, including error-cleanup code in tegra_csi_channels_cleanup(), as 'if (chan->mipi)', which suggests the initial intent was that chan->mipi should be either NULL or a valid pointer, never an error. As a consequence, cleanup code in case of tegra_mipi_request() errors would dereference an invalid pointer. Fix by ensuring chan->mipi always contains either NULL or a void pointer. Also add that to the documentation. Fixes: 523c857e34ce ("media: tegra-video: Add CSI MIPI pads calibration") Cc: stable@vger.kernel.org Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions