imx-common: rdc-sema: correct return value
Subsystems (2)
PATCH 1/1 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]>
--- arch/arm/imx-common/rdc-sema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/imx-common/rdc-sema.c +1 -1
@@ -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 ]);
Signature · 1 line
2.6.2
PATCH 1/1 imx-common: rdc-sema: correct return value
Quoted 15 lines · Peng Fan
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]>--- arch/arm/imx-common/rdc-sema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/imx-common/rdc-sema.c +0
-0
arch/arm/imx-common/rdc-sema.c int imx_rdc_sema_unlock(int per_id) · line 100
Quoted 8 lines
arch/arm/imx-common/rdc-sema.c +1
-1@@ -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 ]);
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================