mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Fix return value in pmu mutex release
Bug 1495617 Change-Id: I689ed4303bb3959bb24bf79d52891de28431fc67 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/394904 (cherry-picked from commit a04c51430b186d23953960965ce3ab229968d1f7) Reviewed-on: http://git-master/r/399565 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
6b71c1d740
commit
f2ef74fbff
@@ -1244,7 +1244,9 @@ int pmu_mutex_release(struct pmu_gk20a *pmu, u32 id, u32 *token)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (--mutex->ref_cnt == 0) {
|
||||
if (--mutex->ref_cnt > 0)
|
||||
return -EBUSY;
|
||||
|
||||
gk20a_writel(g, pwr_pmu_mutex_r(mutex->index),
|
||||
pwr_pmu_mutex_value_initial_lock_f());
|
||||
|
||||
@@ -1255,7 +1257,6 @@ int pmu_mutex_release(struct pmu_gk20a *pmu, u32 id, u32 *token)
|
||||
|
||||
gk20a_dbg_pmu("mutex released: id=%d, token=0x%x",
|
||||
mutex->index, *token);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user