diff options
Diffstat (limited to 'net/9p/trans_virtio.c')
-rw-r--r-- | net/9p/trans_virtio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index ea1e3daabefe..cb50f4ae5eef 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -102,7 +102,8 @@ static void p9_virtio_close(struct p9_client *client) | |||
102 | struct virtio_chan *chan = client->trans; | 102 | struct virtio_chan *chan = client->trans; |
103 | 103 | ||
104 | mutex_lock(&virtio_9p_lock); | 104 | mutex_lock(&virtio_9p_lock); |
105 | chan->inuse = false; | 105 | if (chan) |
106 | chan->inuse = false; | ||
106 | mutex_unlock(&virtio_9p_lock); | 107 | mutex_unlock(&virtio_9p_lock); |
107 | } | 108 | } |
108 | 109 | ||
@@ -311,6 +312,7 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) | |||
311 | } | 312 | } |
312 | 313 | ||
313 | client->trans = (void *)chan; | 314 | client->trans = (void *)chan; |
315 | client->status = Connected; | ||
314 | chan->client = client; | 316 | chan->client = client; |
315 | 317 | ||
316 | return 0; | 318 | return 0; |