ipmi: ipmi_unregister_smi() cannot fail, have it return void

Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
Corey Minyard 2018-04-11 12:41:33 -05:00
parent e56710d26e
commit 6a0d23ed33
4 changed files with 4 additions and 11 deletions

View File

@ -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; struct ipmi_smi_watcher *w;
int intf_num = intf->intf_num, index; 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); cleanup_srcu_struct(&intf->users_srcu);
kref_put(&intf->refcount, intf_free); kref_put(&intf->refcount, intf_free);
return 0;
} }
EXPORT_SYMBOL(ipmi_unregister_smi); EXPORT_SYMBOL(ipmi_unregister_smi);

View File

@ -2365,16 +2365,13 @@ static void shutdown_smi(void *send_info)
static void shutdown_one_si(struct smi_info *smi_info) static void shutdown_one_si(struct smi_info *smi_info)
{ {
int rv;
ipmi_smi_t intf = smi_info->intf; ipmi_smi_t intf = smi_info->intf;
if (!intf) if (!intf)
return; return;
smi_info->intf = NULL; smi_info->intf = NULL;
rv = ipmi_unregister_smi(intf); ipmi_unregister_smi(intf);
if (rv)
pr_err(PFX "Unable to unregister device: errno=%d\n", rv);
} }
static void cleanup_one_si(struct smi_info *smi_info) static void cleanup_one_si(struct smi_info *smi_info)

View File

@ -1247,9 +1247,7 @@ static int ssif_remove(struct i2c_client *client)
*/ */
intf = ssif_info->intf; intf = ssif_info->intf;
ssif_info->intf = NULL; ssif_info->intf = NULL;
rv = ipmi_unregister_smi(intf); ipmi_unregister_smi(intf);
if (rv)
pr_err(PFX "Unable to unregister device: errno=%d\n", rv);
list_for_each_entry(addr_info, &ssif_infos, link) { list_for_each_entry(addr_info, &ssif_infos, link) {
if (addr_info->client == client) { if (addr_info->client == client) {

View File

@ -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 * Remove a low-level interface from the IPMI driver. This will
* return an error if the interface is still in use by a user. * 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. * The lower layer reports received messages through this interface.