Commit d27a3c34 authored by Colin Ian King's avatar Colin Ian King Committed by Sudeep Holla

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 60cc43fc
...@@ -284,7 +284,7 @@ scmi_clock_info_get(const struct scmi_handle *handle, u32 clk_id) ...@@ -284,7 +284,7 @@ scmi_clock_info_get(const struct scmi_handle *handle, u32 clk_id)
struct clock_info *ci = handle->clk_priv; struct clock_info *ci = handle->clk_priv;
struct scmi_clock_info *clk = ci->clk + clk_id; struct scmi_clock_info *clk = ci->clk + clk_id;
if (!clk->name || !clk->name[0]) if (!clk->name[0])
return NULL; return NULL;
return clk; return clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment