Skip to content
Snippets Groups Projects
Commit 354fa867 authored by Peng Fan's avatar Peng Fan Committed by Stefano Babic
Browse files

imx-common: rdc-sema: correct return value


When unlock, if caller is not the sema owner,
return -EACCES, not 1.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
parent 80512547
No related branches found
No related tags found
No related merge requests found
......@@ -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]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment