From 6645fba7c99371d67e03d4d00634dea55c882e20 Mon Sep 17 00:00:00 2001 From: Prasad Joshi Date: Thu, 13 Sep 2012 11:01:30 +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