diff options
Diffstat (limited to 'drivers/nvme/nvme.c')
-rw-r--r-- | drivers/nvme/nvme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 2ac0870ae6b..5d39cab90db 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -785,13 +785,13 @@ static int nvme_probe(struct udevice *udev) goto free_nvme; } - ndev->queues = malloc(2 * sizeof(struct nvme_queue)); + ndev->queues = malloc(2 * sizeof(struct nvme_queue *)); if (!ndev->queues) { ret = -ENOMEM; printf("Error: %s: Out of memory!\n", udev->name); goto free_nvme; } - memset(ndev->queues, 0, sizeof(2 * sizeof(struct nvme_queue))); + memset(ndev->queues, 0, sizeof(2 * sizeof(struct nvme_queue *))); ndev->prp_pool = malloc(MAX_PRP_POOL); if (!ndev->prp_pool) { |