From e5435f0eaf1de94caaf7e018166182b35a389963 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Mon, 20 Jun 2016 17:57:57 -0700 Subject: gpu: nvgpu: fix fecs flush method existence check Properly check that flush method exists. Before this change, it was inconditionnaly called from poll function by accident. Bug 1778951 Change-Id: Ibb8a5b7448bc4b7c475d60439e5b5bd1af9a12bf Signed-off-by: Thomas Fleury Reviewed-on: http://git-master/r/1168144 (cherry picked from commit 178967b91f2632e5b84ce6d11e24f2a8f49c52ea) Reviewed-on: http://git-master/r/1170549 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Richard Zhao GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index aadbf7af..d435bf79 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c @@ -253,7 +253,7 @@ static int gk20a_ctxsw_dev_ioctl_poll(struct gk20a_ctxsw_dev *dev) if (err) return err; - if (g->ops.fecs_trace.flush(g)) + if (g->ops.fecs_trace.flush) err = g->ops.fecs_trace.flush(g); if (likely(!err)) -- cgit v1.2.2