aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/trans_virtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p/trans_virtio.c')
-rw-r--r--net/9p/trans_virtio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 05918d3cb40d..0aaed4819379 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -279,6 +279,7 @@ static int
279p9_virtio_create(struct p9_client *client, const char *devname, char *args) 279p9_virtio_create(struct p9_client *client, const char *devname, char *args)
280{ 280{
281 struct virtio_chan *chan; 281 struct virtio_chan *chan;
282 int ret = -ENOENT;
282 int found = 0; 283 int found = 0;
283 284
284 mutex_lock(&virtio_9p_lock); 285 mutex_lock(&virtio_9p_lock);
@@ -289,13 +290,14 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args)
289 found = 1; 290 found = 1;
290 break; 291 break;
291 } 292 }
293 ret = -EBUSY;
292 } 294 }
293 } 295 }
294 mutex_unlock(&virtio_9p_lock); 296 mutex_unlock(&virtio_9p_lock);
295 297
296 if (!found) { 298 if (!found) {
297 printk(KERN_ERR "9p: no channels available\n"); 299 printk(KERN_ERR "9p: no channels available\n");
298 return -ENODEV; 300 return ret;
299 } 301 }
300 302
301 client->trans = (void *)chan; 303 client->trans = (void *)chan;