From 2d35eee68f5cec18259a14c6573c172948951194 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 24 Aug 2016 15:09:15 -0700 Subject: gpu: nvgpu: Call init_cbc only when defined Call init_cbc only when it contains a non-NULL pointer. Bug 1799537 Change-Id: Ic23f264e10daff30365bf3cf86ac9c155f50e497 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1208008 (cherry picked from commit ec69fa15c32f49d96939fd9a672faec45e078dfa) Reviewed-on: http://git-master/r/1217298 Reviewed-by: Automatic_Commit_Validation_User --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 28236cb9..4c650520 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -4576,7 +4576,8 @@ static int gk20a_init_gr_setup_hw(struct gk20a *g) gr_gk20a_load_zbc_table(g, gr); - g->ops.ltc.init_cbc(g, gr); + if (g->ops.ltc.init_cbc) + g->ops.ltc.init_cbc(g, gr); /* load ctx init */ for (i = 0; i < sw_ctx_load->count; i++) -- cgit v1.2.2