diff options
author | Thierry Reding <treding@nvidia.com> | 2021-12-16 09:56:11 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-12-16 14:07:07 +0100 |
commit | d53830eec05561a0e9918fff8df3861bde74d159 (patch) | |
tree | 3bbe2ad75c13201a58091b00a969b34513f8f187 /drivers/gpu/drm/tegra | |
parent | 4abfc0e3a5460499ce1062cf94089490aade7ca4 (diff) | |
download | linux-d53830eec05561a0e9918fff8df3861bde74d159.tar.gz linux-d53830eec05561a0e9918fff8df3861bde74d159.tar.bz2 linux-d53830eec05561a0e9918fff8df3861bde74d159.zip |
drm/tegra: vic: Handle tegra_drm_alloc() failure
This function can return one of several errors in an ERR_PTR()-encoded
pointer, so make sure to propogate those on failure.
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r-- | drivers/gpu/drm/tegra/vic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index c5f4d2b13c43..7d2b719ed8d1 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -237,6 +237,8 @@ static int vic_load_firmware(struct vic *vic) return -ENOMEM; } else { virt = tegra_drm_alloc(tegra, size, &iova); + if (IS_ERR(virt)) + return PTR_ERR(virt); } vic->falcon.firmware.virt = virt; |