]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
proc_sysctl.c: use BUG_ON instead of BUG
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Thu, 13 Sep 2012 01:01:30 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:18 +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 14c5bdd0ee76b605e4e76b3bdd82699a694664db..608f1870c6eeca530b1323b64c15bb287b243da6 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);