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

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>

authored by

Josef 'Jeff' Sipek and committed by
Eric Van Hensbergen
728fc4ef c1549497

+1 -1
+1 -1
net/9p/client.c
··· 154 154 spin_lock_init(&clnt->lock); 155 155 INIT_LIST_HEAD(&clnt->fidlist); 156 156 clnt->fidpool = p9_idpool_create(); 157 - if (!clnt->fidpool) { 157 + if (IS_ERR(clnt->fidpool)) { 158 158 err = PTR_ERR(clnt->fidpool); 159 159 clnt->fidpool = NULL; 160 160 goto error;