summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVitaliy Shevtsov <v.shevtsov@maxima.ru>2024-12-25 01:45:30 +0000
committerCorey Minyard <corey@minyard.net>2025-01-02 21:11:52 -0600
commit9b6442a3bdd7e0d528122d63c24bd57f6cb05671 (patch)
tree3726d1277ea2a7086c210e039e8fb7c92bd639f1 /include/linux
parent04626c3f1c69909189c9419424887fc2dad48f75 (diff)
ipmi: make ipmi_destroy_user() return void
Return value of ipmi_destroy_user() has no meaning, because it's always zero and callers can do nothing with it. And in most cases it's not checked. So make this function return void. This also will eliminate static code analyzer warnings such as unreachable code/redundant comparison when the return value is checked against non-zero value. Found by Linux Verification Center (linuxtesting.org) with Svace. Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru> Message-ID: <20241225014532.20091-1-v.shevtsov@maxima.ru> Signed-off-by: Corey Minyard <corey@minyard.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipmi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index a1c9c0d48ebf..2f74dd90c271 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -126,7 +126,7 @@ int ipmi_create_user(unsigned int if_num,
* the users before you destroy the callback structures, it should be
* safe, too.
*/
-int ipmi_destroy_user(struct ipmi_user *user);
+void ipmi_destroy_user(struct ipmi_user *user);
/* Get the IPMI version of the BMC we are talking to. */
int ipmi_get_version(struct ipmi_user *user,