projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8051254
)
imx-common: rdc-sema: correct return value
author
Peng Fan
<peng.fan@nxp.com>
Fri, 21 Apr 2017 08:56:50 +0000
(16:56 +0800)
committer
Stefano Babic
<sbabic@denx.de>
Thu, 18 May 2017 09:23:31 +0000
(11:23 +0200)
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>
arch/arm/imx-common/rdc-sema.c
patch
|
blob
|
history
diff --git
a/arch/arm/imx-common/rdc-sema.c
b/arch/arm/imx-common/rdc-sema.c
index 5df4e02b53bda46c02aebd2696ac0b39c695e848..1d97ac8e7fdb7b8c51e5b231ba779de7cac7ba44 100644
(file)
--- a/
arch/arm/imx-common/rdc-sema.c
+++ b/
arch/arm/imx-common/rdc-sema.c
@@
-94,7
+94,7
@@
int imx_rdc_sema_unlock(int per_id)
reg = readb(&imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
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]);