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:36:18 +0000 (13:36 +0200)
commit591777ef0acbace53cd95b5bc5248e59f063e3d3
tree6922deba459aa15d5923c46516178b23bf488b3c
parentfa9e6fc74daf369c87b6b9b39e72020b1fc0be10
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