summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
index 4fea0779..5fe10273 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
@@ -615,6 +615,9 @@ static ssize_t tpc_fs_mask_store(struct device *device,
615 if (kstrtoul(buf, 10, &val) < 0) 615 if (kstrtoul(buf, 10, &val) < 0)
616 return -EINVAL; 616 return -EINVAL;
617 617
618 if (!g->gr.gpc_tpc_mask)
619 return -ENODEV;
620
618 if (val && val != g->gr.gpc_tpc_mask[0] && g->ops.gr.set_gpc_tpc_mask) { 621 if (val && val != g->gr.gpc_tpc_mask[0] && g->ops.gr.set_gpc_tpc_mask) {
619 g->gr.gpc_tpc_mask[0] = val; 622 g->gr.gpc_tpc_mask[0] = val;
620 623