mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +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
@@ -94,8 +94,6 @@ int nvgpu_pd_cache_init(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_pd_cache *cache;
|
||||
u32 i;
|
||||
int err = 0;
|
||||
|
||||
|
||||
/*
|
||||
* This gets called from finalize_poweron() so we need to make sure we
|
||||
@@ -118,12 +116,7 @@ int nvgpu_pd_cache_init(struct gk20a *g)
|
||||
|
||||
cache->mem_tree = NULL;
|
||||
|
||||
err = nvgpu_mutex_init(&cache->lock);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "Error in cache.lock initialization");
|
||||
nvgpu_kfree(g, cache);
|
||||
return err;
|
||||
}
|
||||
nvgpu_mutex_init(&cache->lock);
|
||||
|
||||
g->mm.pd_cache = cache;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user