9p/trans_virtio: Remove sysfs file on probe failure
authorXie Yongji <xieyongji@bytedance.com>
Mon, 17 May 2021 08:35:57 +0000 (16:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 11:37:28 +0000 (13:37 +0200)
commit4ce897d970188359df34009b96d7757b56271b54
tree840583314944f77935d33dae0a9199bf9a7d8545
parentc9a531262879b463d8556c9be14711fcc6d4450b
9p/trans_virtio: Remove sysfs file on probe failure

commit f997ea3b7afc108eb9761f321b57de2d089c7c48 upstream.

This ensures we don't leak the sysfs file if we failed to
allocate chan->vc_wq during probe.

Link: http://lkml.kernel.org/r/20210517083557.172-1-xieyongji@bytedance.com
Fixes: 86c8437383ac ("net/9p: Add sysfs mount_tag file for virtio 9P device")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/9p/trans_virtio.c