Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Remove unecessary NULL check in kernel/acct.c

copy_process() appears to be the only caller of acct_clear_integrals() and
does not pass in NULL task pointers. Remove the unecessary check.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Matt Helsley and committed by
Linus Torvalds
11e64757 7c12d811

+3 -5
+3 -5
kernel/acct.c
··· 599 599 */ 600 600 void acct_clear_integrals(struct task_struct *tsk) 601 601 { 602 - if (tsk) { 603 - tsk->acct_stimexpd = 0; 604 - tsk->acct_rss_mem1 = 0; 605 - tsk->acct_vm_mem1 = 0; 606 - } 602 + tsk->acct_stimexpd = 0; 603 + tsk->acct_rss_mem1 = 0; 604 + tsk->acct_vm_mem1 = 0; 607 605 }