Skip to content

Commit bf10ff6

Browse files
Colin Ian Kingcminyard
authored andcommitted
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 <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent 860f01e commit bf10ff6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,8 +1419,7 @@ static int find_slave_address(struct i2c_client *client, int slave_addr)
14191419
list_for_each_entry(info, &ssif_infos, link) {
14201420
if (info->binfo.addr != client->addr)
14211421
continue;
1422-
if (info->adapter_name && client->adapter->name &&
1423-
strcmp_nospace(info->adapter_name,
1422+
if (info->adapter_name && strcmp_nospace(info->adapter_name,
14241423
client->adapter->name))
14251424
continue;
14261425
if (info->slave_addr) {

0 commit comments

Comments
 (0)