diff options
author | Andrew Goodbody <andrew.goodbody@linaro.org> | 2025-07-28 17:42:21 +0100 |
---|---|---|
committer | Fabio Estevam <festevam@gmail.com> | 2025-08-07 08:15:45 -0300 |
commit | 5275b5612b55a0fac7df32b5eaf4c997c39419c4 (patch) | |
tree | f63f2b318e6b3b1024ac28b74dd3aa6f73ebd20d | |
parent | b1a89c5232f783400669235f148cc0f39accd333 (diff) |
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 <andrew.goodbody@linaro.org>
-rw-r--r-- | drivers/misc/imx8/scu_api.c | 3 |
1 files changed, 1 insertions, 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; } |