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 <prasadjoshi.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
17baa2a2c4
commit
ab4a1f2470
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue