diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-03-30 16:39:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-08 14:52:41 +0200 |
commit | 8974b63acff909ca10c0a21d3e3dbe463cbfb191 (patch) | |
tree | 100e169c0de4af9d96622027bc05194e9a50d25e | |
parent | 2c2f55df3cd79b6adf0a8bfe356496d9d05b64d9 (diff) | |
download | barebox-8974b63acff909ca10c0a21d3e3dbe463cbfb191.tar.gz barebox-8974b63acff909ca10c0a21d3e3dbe463cbfb191.tar.xz |
ARM: stm32mp: init: don't cast signed error to unsigned
bsec_read_field returns a negative value on error, pass it along
signed. This doesn't matter now, because we ignore the error code, but
it's the correct thing to do.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-stm32mp/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/init.c b/arch/arm/mach-stm32mp/init.c index 7bad989a60..6280d94da6 100644 --- a/arch/arm/mach-stm32mp/init.c +++ b/arch/arm/mach-stm32mp/init.c @@ -155,7 +155,7 @@ static inline u32 read_idc(void) } /* Get Device Part Number (RPN) from OTP */ -static u32 get_cpu_rpn(u32 *rpn) +static int get_cpu_rpn(u32 *rpn) { int ret = bsec_read_field(BSEC_OTP_RPN, rpn); if (ret) @@ -170,7 +170,7 @@ static u32 get_cpu_revision(void) return (read_idc() & DBGMCU_IDC_REV_ID_MASK) >> DBGMCU_IDC_REV_ID_SHIFT; } -static u32 get_cpu_type(u32 *type) +static int get_cpu_type(u32 *type) { u32 id; int ret = get_cpu_rpn(type); |