Skip to content

Commit 8d10ea1

Browse files
Tom Rixcminyard
authored andcommitted
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: Tom Rix <[email protected]> Message-Id: <[email protected]> Signed-off-by: Corey Minyard <[email protected]>
1 parent f4676c8 commit 8d10ea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
16251625
unsigned char *resp;
16261626
struct ssif_info *ssif_info;
16271627
int rv = 0;
1628-
int len;
1628+
int len = 0;
16291629
int i;
16301630
u8 slave_addr = 0;
16311631
struct ssif_addr_info *addr_info = NULL;

0 commit comments

Comments
 (0)