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>
This commit is contained in:
parent
4abfc0e3a5
commit
d53830eec0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user