/* Returns: 0: transport successfully unregistered -ENOENT: transport never registered  */
int xprt_unregister_transport(struct xprt_class *transport)
/* Returns: 0: transport successfully unregistered -ENOENT: transport never registered  */
int xprt_unregister_transport(struct xprt_class *transport)
{
	struct xprt_class *t;
	int result;
	result = 0;
	spin_lock(&xprt_list_lock);
	list_for_each_entry(t, &xprt_list, list) {
		if (t == transport) {
			printk(KERN_INFO
				"RPC: Unregistered %s transport module.\n",
				transport->name);
			list_del_init(&transport->list);
			goto out;
		}
	}
	result = -ENOENT;
out:
	spin_unlock(&xprt_list_lock);
	return result;
}