summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/comptags.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/comptags.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/comptags.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/comptags.c b/drivers/gpu/nvgpu/common/mm/comptags.c
index e6c99702..334236ec 100644
--- a/drivers/gpu/nvgpu/common/mm/comptags.c
+++ b/drivers/gpu/nvgpu/common/mm/comptags.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -66,7 +66,12 @@ int gk20a_comptag_allocator_init(struct gk20a *g,
66 struct gk20a_comptag_allocator *allocator, 66 struct gk20a_comptag_allocator *allocator,
67 unsigned long size) 67 unsigned long size)
68{ 68{
69 nvgpu_mutex_init(&allocator->lock); 69 int err = nvgpu_mutex_init(&allocator->lock);
70
71 if (err != 0) {
72 nvgpu_err(g, "Error in allocator.lock mutex initialization");
73 return err;
74 }
70 75
71 /* 76 /*
72 * 0th comptag is special and is never used. The base for this bitmap 77 * 0th comptag is special and is never used. The base for this bitmap