From: Andrew Goodbody Date: Mon, 28 Jul 2025 16:42:21 +0000 (+0100) Subject: imx: scu_api: Remove unnecessary NULL check X-Git-Tag: v2025.10-rc2~6^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5275b5612b55a0fac7df32b5eaf4c997c39419c4;p=pandora-u-boot.git imx: scu_api: Remove unnecessary NULL check 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 --- 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; }