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

Commit 8e33771c authored by Vasyl Gomonovych's avatar Vasyl Gomonovych Committed by Linus Torvalds
Browse files

mm/page_owner.c: use PTR_ERR_OR_ZERO()

Fix ptr_ret.cocci warnings:

  mm/page_owner.c:639:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Link: http://lkml.kernel.org/r/1511824101-9597-1-git-send-email-gomonovych@gmail.com


Signed-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a983b5eb
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -635,9 +635,7 @@ static int __init pageowner_init(void)

	dentry = debugfs_create_file("page_owner", S_IRUSR, NULL,
			NULL, &proc_page_owner_operations);
	if (IS_ERR(dentry))
		return PTR_ERR(dentry);

	return 0;
	return PTR_ERR_OR_ZERO(dentry);
}
late_initcall(pageowner_init)