net/9p/trans_virtio.c: kmalloc() enough memory
authorAdrian Bunk <bunk@kernel.org>
Wed, 20 Feb 2008 00:25:30 +0000 (16:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Feb 2008 00:25:30 +0000 (16:25 -0800)
The Coverity checker spotted that less memory than required was
allocated.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/9p/trans_virtio.c

index 9e3d81cb9f0822e3d0342918ab873b6538193b7c..de7a9f532edc282d6ca0c8e8abc67fbef6633ab6 100644 (file)
@@ -110,7 +110,7 @@ static struct p9_req_t *p9_lookup_tag(struct virtio_chan *c, u16 tag)
                }
                for (count = old_max; count < c->max_tag; count++) {
                        c->reqs[count].status = REQ_STATUS_IDLE;
-                       c->reqs[count].wq = kmalloc(sizeof(wait_queue_t),
+                       c->reqs[count].wq = kmalloc(sizeof(wait_queue_head_t),
                                                                GFP_ATOMIC);
                        if (!c->reqs[count].wq) {
                                printk(KERN_ERR "Couldn't grow tag array\n");