Skip to content

Commit d53830e

Browse files
committed
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]>
1 parent 4abfc0e commit d53830e

File tree

1 file changed

+2
-0
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+2
-0
lines changed

drivers/gpu/drm/tegra/vic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ static int vic_load_firmware(struct vic *vic)
237237
return -ENOMEM;
238238
} else {
239239
virt = tegra_drm_alloc(tegra, size, &iova);
240+
if (IS_ERR(virt))
241+
return PTR_ERR(virt);
240242
}
241243

242244
vic->falcon.firmware.virt = virt;

0 commit comments

Comments
 (0)