diff --git a/fs/afs/main.c b/fs/afs/main.c index 5cd26af2464c..d129a1a49616 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -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; }