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 <tfleury@nvidia.com>
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 <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Thomas Fleury
2016-06-20 17:57:57 -07:00
committed by Terje Bergstrom
parent 475af509e1
commit e5435f0eaf

View File

@@ -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))