From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Corey Minyard <cminyard@mvista.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: openipmi-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [PATCH] ipmi_ssif: Fix uninitialized variable issue
Date: Thu, 19 Apr 2018 08:24:29 -0500 [thread overview]
Message-ID: <20180419132429.GA13997@embeddedor.com> (raw)
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>
---
drivers/char/ipmi/ipmi_ssif.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index ecabfe2..37f9ae2 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)
struct ssif_info *ssif_info = i2c_get_clientdata(client);
struct ipmi_smi *intf;
struct ssif_addr_info *addr_info;
- int rv;
if (!ssif_info)
return 0;
@@ -1247,7 +1246,7 @@ static int ssif_remove(struct i2c_client *client)
}
}
- return rv;
+ return 0;
}
static int do_cmd(struct i2c_client *client, int len, unsigned char *msg,
--
2.7.4
next reply other threads:[~2018-04-19 13:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 13:24 Gustavo A. R. Silva [this message]
2018-04-19 13:40 ` [PATCH] ipmi_ssif: Fix uninitialized variable issue Corey Minyard
2018-04-19 13:58 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180419132429.GA13997@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=arnd@arndb.de \
--cc=cminyard@mvista.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.