Commit cf8d3223 authored by Mikko Perttunen's avatar Mikko Perttunen Committed by Thierry Reding

drm/tegra: Add error check for NVDEC firmware memory allocation

The return value for tegra_drm_alloc was missing an error check.
Add one.
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413082202.114721-1-cyndis@kapsi.fi
parent aeedd3a8
...@@ -274,6 +274,8 @@ static int nvdec_load_falcon_firmware(struct nvdec *nvdec) ...@@ -274,6 +274,8 @@ static int nvdec_load_falcon_firmware(struct nvdec *nvdec)
return err; return err;
} else { } else {
virt = tegra_drm_alloc(tegra, size, &iova); virt = tegra_drm_alloc(tegra, size, &iova);
if (IS_ERR(virt))
return PTR_ERR(virt);
} }
nvdec->falcon.firmware.virt = virt; nvdec->falcon.firmware.virt = virt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment