diff options
| author | Peng Fan <[email protected]> | 2017-04-21 16:56:50 +0800 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2017-05-11 12:36:56 +0200 |
| commit | ca10aa75617c1a2a393b2f3dadb479aec5943966 (patch) | |
| tree | e89852d86e02fb4f65570d5836a6a454351ae14a | |
| parent | a267d3accd98fe246df72d6f36922ba146b437d4 (diff) | |
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 <[email protected]>
Cc: Stefano Babic <[email protected]>
| -rw-r--r-- | arch/arm/imx-common/rdc-sema.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/imx-common/rdc-sema.c b/arch/arm/imx-common/rdc-sema.c index 5df4e02b53b..1d97ac8e7fd 100644 --- 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]); |
