mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
afs: Fix an IS_ERR() vs NULL check
[ Upstream commita33d62662d
] The proc_symlink() function returns NULL on error, it doesn't return error pointers. Fixes:5b86d4ff5d
("afs: Implement network namespacing") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/YLjMRKX40pTrJvgf@mwanda/ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2a3f74ca16
commit
0498165c6f
1 changed files with 2 additions and 2 deletions
|
@ -196,8 +196,8 @@ static int __init afs_init(void)
|
|||
goto error_fs;
|
||||
|
||||
afs_proc_symlink = proc_symlink("fs/afs", NULL, "../self/net/afs");
|
||||
if (IS_ERR(afs_proc_symlink)) {
|
||||
ret = PTR_ERR(afs_proc_symlink);
|
||||
if (!afs_proc_symlink) {
|
||||
ret = -ENOMEM;
|
||||
goto error_proc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue