mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
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>
This commit is contained in:
committed by
Corey Minyard
parent
860f01e969
commit
bf10ff69dd
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user