public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prasad Joshi <prasadjoshi.linux@gmail.com>
To: prasadjoshi.linux@gmail.com
Cc: ebiederm@xmission.com, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, lucas.demarchi@profusion.mobi,
	linux-kernel@vger.kernel.org
Subject: [PATCH] sysctl: Use BUG_ON instead of BUG
Date: Mon,  3 Sep 2012 09:00:25 +0530	[thread overview]
Message-ID: <1346643025-2769-1-git-send-email-prasadjoshi.linux@gmail.com> (raw)

The use of if (!head) BUG(); can be replaced with single line
BUG_ON(!head).

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
 fs/proc/proc_sysctl.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index dfafeb2..63bdfa0 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -266,8 +266,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);
-- 
1.7.5.4


             reply	other threads:[~2012-09-03  3:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03  3:30 Prasad Joshi [this message]
2012-09-04 23:18 ` [PATCH] sysctl: Use BUG_ON instead of BUG Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346643025-2769-1-git-send-email-prasadjoshi.linux@gmail.com \
    --to=prasadjoshi.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox