mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 18:59:44 +00:00
imx-common: rdc-sema: correct return value
When unlock, if caller is not the sema owner, return -EACCES, not 1. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
a267d3accd
commit
ca10aa7561
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ int imx_rdc_sema_unlock(int per_id)
|
||||||
|
|
||||||
reg = readb(&imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
|
reg = readb(&imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
|
||||||
if ((reg & RDC_SEMA_GATE_GTFSM_MASK) != RDC_SEMA_PROC_ID)
|
if ((reg & RDC_SEMA_GATE_GTFSM_MASK) != RDC_SEMA_PROC_ID)
|
||||||
return 1; /*Not the semaphore owner */
|
return -EACCES; /*Not the semaphore owner */
|
||||||
|
|
||||||
writeb(0x0, &imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
|
writeb(0x0, &imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue