提交 d27a3c34 编写于 作者: C Colin Ian King 提交者: 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: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册