]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
proc_sysctl.c: use BUG_ON instead of BUG
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Fri, 28 Sep 2012 00:22:17 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:01:40 +0000 (14:01 +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);