mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: make nvgpu_init_mutex return void
Make the nvgpu_init_mutex function return void. In linux case, this doesn't affect anything since mutex_init returns void. For posix, we assert() and die if pthread_mutex_init fails. This alleviates the need to error inject for _every_ nvgpu_mutex_init function in the driver. Jira NVGPU-3476 Change-Id: Ibc801116dc82cdfcedcba2c352785f2640b7d54f Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2130538 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c74b89194d
commit
97762279b7
@@ -551,7 +551,6 @@ static int gk20a_ctxsw_init_devs(struct gk20a *g)
|
||||
{
|
||||
struct gk20a_ctxsw_trace *trace = g->ctxsw_trace;
|
||||
struct gk20a_ctxsw_dev *dev = trace->devs;
|
||||
int err;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < GK20A_CTXSW_TRACE_NUM_DEVS; i++) {
|
||||
@@ -559,9 +558,7 @@ static int gk20a_ctxsw_init_devs(struct gk20a *g)
|
||||
dev->hdr = NULL;
|
||||
dev->write_enabled = false;
|
||||
nvgpu_cond_init(&dev->readout_wq);
|
||||
err = nvgpu_mutex_init(&dev->write_lock);
|
||||
if (err)
|
||||
return err;
|
||||
nvgpu_mutex_init(&dev->write_lock);
|
||||
nvgpu_atomic_set(&dev->vma_ref, 0);
|
||||
dev++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user