From cfd3b3fa727e32637941df12ad9ff17fb8165313 Mon Sep 17 00:00:00 2001 From: Prasad Joshi Date: Fri, 28 Sep 2012 10:22:17 +1000 Subject: [PATCH] proc_sysctl.c: use BUG_ON instead of BUG The use of if (!head) BUG(); can be replaced with the single line BUG_ON(!head). Signed-off-by: Prasad Joshi Signed-off-by: Andrew Morton --- fs/proc/proc_sysctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index a42243fa9cdb..a781bdf06694 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -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); -- 2.39.5