[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/7] hw/ide/pci.c: Remove dead code from bmdma_prepare_buf()
From: |
Peter Maydell |
Subject: |
[PATCH 6/7] hw/ide/pci.c: Remove dead code from bmdma_prepare_buf() |
Date: |
Wed, 31 Jul 2024 15:36:16 +0100 |
Coverity notes that the code at the end of the loop in
bmdma_prepare_buf() is unreachable. This is because in commit
9fbf0fa81fca8f527 ("ide: remove hardcoded 2GiB transactional limit")
we removed the only codepath in the loop which could "break" out of
it, but didn't notice that this meant we should also remove the code
at the end of the loop.
Remove the dead code.
Resolves: Coverity CID 1547772
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/ide/pci.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 4675d079a17..f2cb500a94f 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -266,10 +266,6 @@ static int32_t bmdma_prepare_buf(const IDEDMA *dma,
int32_t limit)
s->io_buffer_size += l;
}
}
-
- qemu_sglist_destroy(&s->sg);
- s->io_buffer_size = 0;
- return -1;
}
/* return 0 if buffer completed */
--
2.34.1
- [PATCH 0/7] block: Miscellaneous minor Coverity fixes, Peter Maydell, 2024/07/31
- [PATCH 1/7] block/vdi.c: Avoid potential overflow when calculating size of write, Peter Maydell, 2024/07/31
- [PATCH 2/7] block/gluster: Use g_autofree for string in qemu_gluster_parse_json(), Peter Maydell, 2024/07/31
- [PATCH 3/7] hw/block/pflash_cfi01: Don't decrement pfl->counter below 0, Peter Maydell, 2024/07/31
- [PATCH 6/7] hw/ide/pci.c: Remove dead code from bmdma_prepare_buf(),
Peter Maydell <=
- [PATCH 4/7] hw/ide/atapi: Be explicit that assigning to s->lcyl truncates, Peter Maydell, 2024/07/31
- [PATCH 7/7] block/ssh.c: Don't double-check that characters are hex digits, Peter Maydell, 2024/07/31
- [PATCH 5/7] hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found something, Peter Maydell, 2024/07/31