diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-03-21 21:01:58 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2018-04-16 12:15:58 +0300 |
commit | d27a3c3436a7f68f3affd7991cb4a68e91dd747e (patch) | |
tree | e411103dd8f9749c9335afe9e37edd0449982542 /drivers/firmware/arm_scmi | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) | |
download | linux-d27a3c3436a7f68f3affd7991cb4a68e91dd747e.tar.xz |
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/arm_scmi')
-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 e6f17825db79..2b90606452a2 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; |