aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-30 18:59:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-05 13:35:49 -0400
commitf368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e (patch)
treea9ed27128f04f21ed0f205ec94a1ad0dbf746bb4 /fs
parent379e4f756b915bcc35958365e5d1326b3b54efce (diff)
char: make misc_deregister a void function
With well over 200+ users of this api, there are a mere 12 users that actually checked the return value of this function. And all of them really didn't do anything with that information as the system or module was shutting down no matter what. So stop pretending like it matters, and just return void from misc_deregister(). If something goes wrong in the call, you will get a WARNING splat in the syslog so you know how to fix up your driver. Other than that, there's nothing that can go wrong. Cc: Alasdair Kergon <agk@redhat.com> Cc: Neil Brown <neilb@suse.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Christine Caulfield <ccaulfie@redhat.com> Cc: David Teigland <teigland@redhat.com> Cc: Mark Fasheh <mfasheh@suse.com> Acked-by: Joel Becker <jlbec@evilplan.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/super.c3
-rw-r--r--fs/dlm/plock.c3
-rw-r--r--fs/dlm/user.c9
-rw-r--r--fs/ocfs2/stack_user.c9
4 files changed, 6 insertions, 18 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index cd7ef34d2dce..6bad63379a4c 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2163,8 +2163,7 @@ static int btrfs_interface_init(void)
2163 2163
2164static void btrfs_interface_exit(void) 2164static void btrfs_interface_exit(void)
2165{ 2165{
2166 if (misc_deregister(&btrfs_misc) < 0) 2166 misc_deregister(&btrfs_misc);
2167 printk(KERN_INFO "BTRFS: misc_deregister failed for control device\n");
2168} 2167}
2169 2168
2170static void btrfs_print_info(void) 2169static void btrfs_print_info(void)
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index e0ab3a93eeff..5532f097f6da 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -509,7 +509,6 @@ int dlm_plock_init(void)
509 509
510void dlm_plock_exit(void) 510void dlm_plock_exit(void)
511{ 511{
512 if (misc_deregister(&plock_dev_misc) < 0) 512 misc_deregister(&plock_dev_misc);
513 log_print("dlm_plock_exit: misc_deregister failed");
514} 513}
515 514
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index fb85f32e9eca..75ecc0d3bc85 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -362,18 +362,15 @@ fail:
362 362
363int dlm_device_deregister(struct dlm_ls *ls) 363int dlm_device_deregister(struct dlm_ls *ls)
364{ 364{
365 int error;
366
367 /* The device is not registered. This happens when the lockspace 365 /* The device is not registered. This happens when the lockspace
368 was never used from userspace, or when device_create_lockspace() 366 was never used from userspace, or when device_create_lockspace()
369 calls dlm_release_lockspace() after the register fails. */ 367 calls dlm_release_lockspace() after the register fails. */
370 if (!ls->ls_device.name) 368 if (!ls->ls_device.name)
371 return 0; 369 return 0;
372 370
373 error = misc_deregister(&ls->ls_device); 371 misc_deregister(&ls->ls_device);
374 if (!error) 372 kfree(ls->ls_device.name);
375 kfree(ls->ls_device.name); 373 return 0;
376 return error;
377} 374}
378 375
379static int device_user_purge(struct dlm_user_proc *proc, 376static int device_user_purge(struct dlm_user_proc *proc,
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index 2768eb1da2b8..ced70c8139f7 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -655,14 +655,7 @@ static int ocfs2_control_init(void)
655 655
656static void ocfs2_control_exit(void) 656static void ocfs2_control_exit(void)
657{ 657{
658 int rc; 658 misc_deregister(&ocfs2_control_device);
659
660 rc = misc_deregister(&ocfs2_control_device);
661 if (rc)
662 printk(KERN_ERR
663 "ocfs2: Unable to deregister ocfs2_control device "
664 "(errno %d)\n",
665 -rc);
666} 659}
667 660
668static void fsdlm_lock_ast_wrapper(void *astarg) 661static void fsdlm_lock_ast_wrapper(void *astarg)