mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
nvme: Fix wrong ndev->queues memset
memset() was given a sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *) to clear, which is wrong. Reported-by: Coverity (CID: 166729) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
5eae466ea1
commit
37d46870b3
1 changed files with 1 additions and 2 deletions
|
@ -791,8 +791,7 @@ static int nvme_probe(struct udevice *udev)
|
|||
printf("Error: %s: Out of memory!\n", udev->name);
|
||||
goto free_nvme;
|
||||
}
|
||||
memset(ndev->queues, 0,
|
||||
sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *)));
|
||||
memset(ndev->queues, 0, NVME_Q_NUM * sizeof(struct nvme_queue *));
|
||||
|
||||
ndev->prp_pool = malloc(MAX_PRP_POOL);
|
||||
if (!ndev->prp_pool) {
|
||||
|
|
Loading…
Reference in a new issue