]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
proc_sysctl.c: use BUG_ON instead of BUG
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Wed, 26 Sep 2012 01:34:56 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:28:53 +0000 (17:28 +1000)
The use of if (!head) BUG(); can be replaced with the single line
BUG_ON(!head).

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/proc_sysctl.c

index a42243fa9cdb834e5c016b9afacee8a22b2b91a9..a781bdf0669464ced3e213faad5ed6ab3a37a06b 100644 (file)
@@ -265,8 +265,7 @@ void sysctl_head_put(struct ctl_table_header *head)
 
 static struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *head)
 {
-       if (!head)
-               BUG();
+       BUG_ON(!head);
        spin_lock(&sysctl_lock);
        if (!use_table(head))
                head = ERR_PTR(-ENOENT);