提交 bebf8cfa 编写于 作者: D Dan Carpenter 提交者: Linus Torvalds

afs: destroy work queue on init failure

We can clean up the work queue on this error path.  This function is
called from afs_init().
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a35274cd
...@@ -100,6 +100,7 @@ int afs_open_socket(void) ...@@ -100,6 +100,7 @@ int afs_open_socket(void)
ret = kernel_bind(socket, (struct sockaddr *) &srx, sizeof(srx)); ret = kernel_bind(socket, (struct sockaddr *) &srx, sizeof(srx));
if (ret < 0) { if (ret < 0) {
sock_release(socket); sock_release(socket);
destroy_workqueue(afs_async_calls);
_leave(" = %d [bind]", ret); _leave(" = %d [bind]", ret);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册