Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab4a1f24 authored by Prasad Joshi's avatar Prasad Joshi Committed by Linus Torvalds
Browse files

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: default avatarPrasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 17baa2a2
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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)
static struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *head)
{
{
	if (!head)
	BUG_ON(!head);
		BUG();
	spin_lock(&sysctl_lock);
	spin_lock(&sysctl_lock);
	if (!use_table(head))
	if (!use_table(head))
		head = ERR_PTR(-ENOENT);
		head = ERR_PTR(-ENOENT);