aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <[email protected]>2021-12-16 09:56:11 +0100
committerThierry Reding <[email protected]>2021-12-16 14:07:07 +0100
commitd53830eec05561a0e9918fff8df3861bde74d159 (patch)
tree3bbe2ad75c13201a58091b00a969b34513f8f187
parent4abfc0e3a5460499ce1062cf94089490aade7ca4 (diff)
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
-rw-r--r--drivers/gpu/drm/tegra/vic.c2
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;