Commit 8d10ea15 authored by Tom Rix's avatar Tom Rix Committed by Corey Minyard

ipmi: initialize len variable

Clang static analysis reports this issue
ipmi_ssif.c:1731:3: warning: 4th function call
  argument is an uninitialized value
  dev_info(&ssif_info->client->dev,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The 4th parameter is the 'len' variable.
len is only set by a successful call to do_cmd().
Initialize to len 0.
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Message-Id: <20220320135954.2258545-1-trix@redhat.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent f4676c8e
...@@ -1625,7 +1625,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1625,7 +1625,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
unsigned char *resp; unsigned char *resp;
struct ssif_info *ssif_info; struct ssif_info *ssif_info;
int rv = 0; int rv = 0;
int len; int len = 0;
int i; int i;
u8 slave_addr = 0; u8 slave_addr = 0;
struct ssif_addr_info *addr_info = NULL; struct ssif_addr_info *addr_info = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment