diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2023-04-13 11:22:01 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-07-27 19:41:59 +0300 |
commit | cf8d3223218744d29793071ec6d61eba29057d90 (patch) | |
tree | c51b8435c1b98e6e8dc12f688bcb8984cdab6191 /drivers | |
parent | aeedd3a82678d89627bdd020a28e0af35ff45552 (diff) | |
download | linux-cf8d3223218744d29793071ec6d61eba29057d90.tar.xz |
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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413082202.114721-1-cyndis@kapsi.fi
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/tegra/nvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/nvdec.c b/drivers/gpu/drm/tegra/nvdec.c index f821e36111a7..9f57968392af 100644 --- a/drivers/gpu/drm/tegra/nvdec.c +++ b/drivers/gpu/drm/tegra/nvdec.c @@ -274,6 +274,8 @@ static int nvdec_load_falcon_firmware(struct nvdec *nvdec) return err; } else { virt = tegra_drm_alloc(tegra, size, &iova); + if (IS_ERR(virt)) + return PTR_ERR(virt); } nvdec->falcon.firmware.virt = virt; |