diff options
author | Corey Minyard <cminyard@mvista.com> | 2018-04-11 12:41:33 -0500 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2018-04-18 10:23:05 -0500 |
commit | 6a0d23ed338ed7015128378e0ceec03eaa3d91e2 (patch) | |
tree | d9d8faec07875906e6ed3665a3c1714b3df2dd82 | |
parent | e56710d26eba07abca34c39c50e02e854436000a (diff) | |
download | linux-6a0d23ed338ed7015128378e0ceec03eaa3d91e2.tar.bz2 |
ipmi: ipmi_unregister_smi() cannot fail, have it return void
Signed-off-by: Corey Minyard <cminyard@mvista.com>
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 4 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 5 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 4 | ||||
-rw-r--r-- | include/linux/ipmi_smi.h | 2 |
4 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 7ddadab65f33..946bfcb1eeee 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3711,7 +3711,7 @@ static void cleanup_smi_msgs(struct ipmi_smi *intf) } } -int ipmi_unregister_smi(struct ipmi_smi *intf) +void ipmi_unregister_smi(struct ipmi_smi *intf) { struct ipmi_smi_watcher *w; int intf_num = intf->intf_num, index; @@ -3755,8 +3755,6 @@ int ipmi_unregister_smi(struct ipmi_smi *intf) cleanup_srcu_struct(&intf->users_srcu); kref_put(&intf->refcount, intf_free); - - return 0; } EXPORT_SYMBOL(ipmi_unregister_smi); diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 00a324060dcd..2222caf4bab7 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2365,16 +2365,13 @@ static void shutdown_smi(void *send_info) static void shutdown_one_si(struct smi_info *smi_info) { - int rv; ipmi_smi_t intf = smi_info->intf; if (!intf) return; smi_info->intf = NULL; - rv = ipmi_unregister_smi(intf); - if (rv) - pr_err(PFX "Unable to unregister device: errno=%d\n", rv); + ipmi_unregister_smi(intf); } static void cleanup_one_si(struct smi_info *smi_info) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 8c72f271d4b4..17cae7a41b70 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -1247,9 +1247,7 @@ static int ssif_remove(struct i2c_client *client) */ intf = ssif_info->intf; ssif_info->intf = NULL; - rv = ipmi_unregister_smi(intf); - if (rv) - pr_err(PFX "Unable to unregister device: errno=%d\n", rv); + ipmi_unregister_smi(intf); list_for_each_entry(addr_info, &ssif_infos, link) { if (addr_info->client == client) { diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 16662b0423bf..26ba57c307f0 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -220,7 +220,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers, * Remove a low-level interface from the IPMI driver. This will * return an error if the interface is still in use by a user. */ -int ipmi_unregister_smi(ipmi_smi_t intf); +void ipmi_unregister_smi(ipmi_smi_t intf); /* * The lower layer reports received messages through this interface. |