diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-03-21 18:01:58 +0000 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2018-04-16 10:15:58 +0100 |
commit | d27a3c3436a7f68f3affd7991cb4a68e91dd747e (patch) | |
tree | e411103dd8f9749c9335afe9e37edd0449982542 /drivers/firmware | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) | |
download | op-kernel-dev-d27a3c3436a7f68f3affd7991cb4a68e91dd747e.zip op-kernel-dev-d27a3c3436a7f68f3affd7991cb4a68e91dd747e.tar.gz |
firmware: arm_scmi: remove redundant null check on array
The null check on clk->name is redundant since name is a char array
and can never be null, so the check is always true. Remove it.
Detected by CoverityScan, CID#1466117 ("Array compared against 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scmi/clock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index e6f1782..2b90606 100644 --- a/drivers/firmware/arm_scmi/clock.c +++ b/drivers/firmware/arm_scmi/clock.c @@ -284,7 +284,7 @@ scmi_clock_info_get(const struct scmi_handle *handle, u32 clk_id) struct clock_info *ci = handle->clk_priv; struct scmi_clock_info *clk = ci->clk + clk_id; - if (!clk->name || !clk->name[0]) + if (!clk->name[0]) return NULL; return clk; |