[PATCH] imx: scu_api: Remove unnecessary NULL check
Andrew Goodbody
andrew.goodbody at linaro.org
Mon Jul 28 18:42:21 CEST 2025
In sc_seco_secvio_dgo_config there is a check for data being NULL but
this occurs after data has already been dereferenced. All callers of the
function provide a valid pointer for data so no need for the NULL check.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
drivers/misc/imx8/scu_api.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index a40c8badf9a..8985ab6584d 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -1282,8 +1282,7 @@ int sc_seco_secvio_dgo_config(sc_ipc_t ipc, u8 id, u8 access, u32 *data)
printf("%s, id:0x%x, access:%x, res:%d\n",
__func__, id, access, RPC_R8(&msg));
- if (data)
- *data = RPC_U32(&msg, 0U);
+ *data = RPC_U32(&msg, 0U);
return ret;
}
---
base-commit: 4c3b5fcd810081bd7f3c51859fe1b5f0c159803c
change-id: 20250728-scu_api-f844bffcbceb
Best regards,
--
Andrew Goodbody <andrew.goodbody at linaro.org>
More information about the U-Boot
mailing list