9p/xen: Add cleanup path in p9_trans_xen_init
authorYueHaibing <yuehaibing@huawei.com>
Tue, 30 Apr 2019 14:39:33 +0000 (22:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:39 +0000 (07:28 +0200)
commit70a6cebb9bf303d69bba3ded940877225584f60b
tree598123f32a939c4c78f574a3eb88e507b4f03923
parent93774aa0954cf393a09217b01f0a371b1f9eedf5
9p/xen: Add cleanup path in p9_trans_xen_init

commit 80a316ff16276b36d0392a8f8b2f63259857ae98 upstream.

If xenbus_register_frontend() fails in p9_trans_xen_init,
we should call v9fs_unregister_trans() to do cleanup.

Link: http://lkml.kernel.org/r/20190430143933.19368-1-yuehaibing@huawei.com
Cc: stable@vger.kernel.org
Fixes: 868eb122739a ("xen/9pfs: introduce Xen 9pfs transport driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/9p/trans_xen.c