aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-04-19 09:24:29 -0400
committerCorey Minyard <cminyard@mvista.com>2018-04-19 09:37:58 -0400
commit1211229399b3f9b8b0e337c898efb09695f71c91 (patch)
tree5c26abdcd8a54c556be3176b0b74fe6c76180c99
parent6b2e54f7babea6c782a9c1af9d01c7f999bb4c7d (diff)
ipmi_ssif: Fix uninitialized variable issue
Currently, function ssif_remove returns _rv_, which is a variable that is never initialized. Fix this by removing variable _rv_ and return 0 instead. Addresses-Coverity-ID: 1467999 ("Uninitialized scalar variable") Fixes: 6a0d23ed338e ("ipmi: ipmi_unregister_smi() cannot fail, have it return void") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index ecabfe27c828..37f9ae2de6a4 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1227,7 +1227,6 @@ static int ssif_remove(struct i2c_client *client)
1227 struct ssif_info *ssif_info = i2c_get_clientdata(client); 1227 struct ssif_info *ssif_info = i2c_get_clientdata(client);
1228 struct ipmi_smi *intf; 1228 struct ipmi_smi *intf;
1229 struct ssif_addr_info *addr_info; 1229 struct ssif_addr_info *addr_info;
1230 int rv;
1231 1230
1232 if (!ssif_info) 1231 if (!ssif_info)
1233 return 0; 1232 return 0;
@@ -1247,7 +1246,7 @@ static int ssif_remove(struct i2c_client *client)
1247 } 1246 }
1248 } 1247 }
1249 1248
1250 return rv; 1249 return 0;
1251} 1250}
1252 1251
1253static int do_cmd(struct i2c_client *client, int len, unsigned char *msg, 1252static int do_cmd(struct i2c_client *client, int len, unsigned char *msg,