summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-03-12 17:53:51 +0100
committerThierry Reding <treding@nvidia.com>2018-04-04 16:23:12 +0200
commitb15f6ea49da2c8302f27c6377281343237bfbd22 (patch)
tree565e2ab5acd8d17acb04ba418cf598c546de503b
parent922cd38172b8a2bc286bd082fde9cad4e278765b (diff)
tegra: Do not import resource on failure
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--src/gallium/drivers/tegra/tegra_screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/tegra/tegra_screen.c b/src/gallium/drivers/tegra/tegra_screen.c
index 669f22a1944..dde2d76d107 100644
--- a/src/gallium/drivers/tegra/tegra_screen.c
+++ b/src/gallium/drivers/tegra/tegra_screen.c
@@ -254,7 +254,7 @@ static int tegra_screen_import_resource(struct tegra_screen *screen,
close(fd);
- if (!has_modifiers) {
+ if (err == 0 && !has_modifiers) {
memset(&args, 0, sizeof(args));
args.handle = resource->handle;