aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si_intf.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-08-07 11:19:27 +0200
committerHelge Deller <deller@gmx.de>2021-08-30 10:18:25 +0200
commit87875c1084a28364dad8cd4f9ecbfdfe0b845ad5 (patch)
treecdb664f154ac23a7053af31401d56a92c8b953d3 /drivers/char/ipmi/ipmi_si_intf.c
parentd220da0967dbda232350c5dc39317e04e0892743 (diff)
downloadlinux-87875c1084a28364dad8cd4f9ecbfdfe0b845ad5.tar.gz
parisc: Make struct parisc_driver::remove() return void
The caller of this function (parisc_driver_remove() in arch/parisc/kernel/drivers.c) ignores the return value, so better don't return any value at all to not wake wrong expectations in driver authors. The only function that could return a non-zero value before was ipmi_parisc_remove() which returns the return value of ipmi_si_remove_by_dev(). Make this function return void, too, as for all other callers the value is ignored, too. Also fold in a small checkpatch fix for: WARNING: Unnecessary space before function pointer arguments + void (*remove) (struct parisc_device *dev); Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (for drivers/input) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Acked-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 62929a3e397ee5..bb466981dc1b7a 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2228,22 +2228,18 @@ static void cleanup_one_si(struct smi_info *smi_info)
kfree(smi_info);
}
-int ipmi_si_remove_by_dev(struct device *dev)
+void ipmi_si_remove_by_dev(struct device *dev)
{
struct smi_info *e;
- int rv = -ENOENT;
mutex_lock(&smi_infos_lock);
list_for_each_entry(e, &smi_infos, link) {
if (e->io.dev == dev) {
cleanup_one_si(e);
- rv = 0;
break;
}
}
mutex_unlock(&smi_infos_lock);
-
- return rv;
}
struct device *ipmi_si_remove_by_data(int addr_space, enum si_type si_type,