Re: [PATCH] char: ipmi: remove unnecessary code

From: Corey Minyard
Date: Wed May 17 2017 - 09:11:30 EST


On 05/15/2017 03:46 PM, Gustavo A. R. Silva wrote:
The array field name in struct i2c_adapter is a fixed size array
so it can never be NULL.

This was already caught by Colin Ian King, a patch is already queued for this.

Thanks,

-corey

Addresses-Coverity-ID: 1397986
Signed-off-by: Gustavo A. R. Silva <garsilva@xxxxxxxxxxxxxx>
---
drivers/char/ipmi/ipmi_ssif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index cca6e5b..df4fea7 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1415,7 +1415,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 &&
+ if (info->adapter_name &&
strcmp_nospace(info->adapter_name,
client->adapter->name))
continue;