Skip to content

Commit 728fc4e

Browse files
jeffpcEric Van Hensbergen
authored andcommitted
9p: Correct fidpool creation failure in p9_client_create
On error, p9_idpool_create returns an ERR_PTR-encoded errno. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
1 parent c154949 commit 728fc4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/9p/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
154154
spin_lock_init(&clnt->lock);
155155
INIT_LIST_HEAD(&clnt->fidlist);
156156
clnt->fidpool = p9_idpool_create();
157-
if (!clnt->fidpool) {
157+
if (IS_ERR(clnt->fidpool)) {
158158
err = PTR_ERR(clnt->fidpool);
159159
clnt->fidpool = NULL;
160160
goto error;

0 commit comments

Comments
 (0)