summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-05-07 19:05:16 +0100
committerCorey Minyard <cminyard@mvista.com>2017-05-17 18:30:35 -0500
commitbf10ff69dd6e27710b21863ebd8e6504d9516222 (patch)
treebf9dd29df979103926dfb93dcfae251fe491e0da /drivers/char
parent860f01e96981a68553f3ca49f574ff14fe955e72 (diff)
downloadlinux-stable-bf10ff69dd6e27710b21863ebd8e6504d9516222.tar.gz
linux-stable-bf10ff69dd6e27710b21863ebd8e6504d9516222.tar.bz2
linux-stable-bf10ff69dd6e27710b21863ebd8e6504d9516222.zip
ipmi_ssif: remove redundant null check on array client->adapter->name
The null check on client->adapter->name is redundant as name is an array of I2C_NAME_SIZE chars and hence can never be null. We may as well remove this redundant check. Detected by CoverityScan, CID#1375918 ("Array compared against 0") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 6dd6476ea5d3..1d4fd846e457 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1419,8 +1419,7 @@ static int find_slave_address(struct i2c_client *client, int slave_addr)
list_for_each_entry(info, &ssif_infos, link) {
if (info->binfo.addr != client->addr)
continue;
- if (info->adapter_name && client->adapter->name &&
- strcmp_nospace(info->adapter_name,
+ if (info->adapter_name && strcmp_nospace(info->adapter_name,
client->adapter->name))
continue;
if (info->slave_addr) {