diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c index afba2496..dcd5b074 100644 --- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c | |||
@@ -455,8 +455,6 @@ static int css_gr_create_client_data(struct gk20a *g, | |||
455 | u32 perfmon_count, | 455 | u32 perfmon_count, |
456 | struct gk20a_cs_snapshot_client *cur) | 456 | struct gk20a_cs_snapshot_client *cur) |
457 | { | 457 | { |
458 | int ret = 0; | ||
459 | |||
460 | memset(cur->snapshot, 0, sizeof(*cur->snapshot)); | 458 | memset(cur->snapshot, 0, sizeof(*cur->snapshot)); |
461 | cur->snapshot->start = sizeof(*cur->snapshot); | 459 | cur->snapshot->start = sizeof(*cur->snapshot); |
462 | /* we should be ensure that can fit all fifo entries here */ | 460 | /* we should be ensure that can fit all fifo entries here */ |
@@ -475,21 +473,13 @@ static int css_gr_create_client_data(struct gk20a *g, | |||
475 | if (cur->perfmon_count && g->ops.css.allocate_perfmon_ids) { | 473 | if (cur->perfmon_count && g->ops.css.allocate_perfmon_ids) { |
476 | cur->perfmon_start = g->ops.css.allocate_perfmon_ids(data, | 474 | cur->perfmon_start = g->ops.css.allocate_perfmon_ids(data, |
477 | cur->perfmon_count); | 475 | cur->perfmon_count); |
478 | if (!cur->perfmon_start) { | 476 | if (!cur->perfmon_start) |
479 | ret = -ENOENT; | 477 | return -ENOENT; |
480 | goto failed; | ||
481 | } | ||
482 | } | 478 | } |
483 | 479 | ||
484 | nvgpu_list_add_tail(&cur->list, &data->clients); | 480 | nvgpu_list_add_tail(&cur->list, &data->clients); |
485 | 481 | ||
486 | return 0; | 482 | return 0; |
487 | |||
488 | failed: | ||
489 | if (cur) | ||
490 | css_gr_free_client_data(g, data, cur); | ||
491 | |||
492 | return ret; | ||
493 | } | 483 | } |
494 | 484 | ||
495 | 485 | ||