summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-03-21 19:01:58 +0100
committerSudeep Holla <sudeep.holla@arm.com>2018-04-16 11:15:58 +0200
commitd27a3c3436a7f68f3affd7991cb4a68e91dd747e (patch)
treee411103dd8f9749c9335afe9e37edd0449982542 /drivers
parentLinux 4.17-rc1 (diff)
downloadlinux-d27a3c3436a7f68f3affd7991cb4a68e91dd747e.tar.xz
linux-d27a3c3436a7f68f3affd7991cb4a68e91dd747e.zip
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')
-rw-r--r--drivers/firmware/arm_scmi/clock.c2
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;