]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/ide/pci: Remove dead code from bmdma_prepare_buf()
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 31 Jul 2024 14:36:16 +0000 (15:36 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 6 Aug 2024 08:22:52 +0000 (10:22 +0200)
commitc1a6ae5145f2e72c1eaf53b7a8c96cdbb64211bd
tree9ad6974dbccfc2e490172c0b8a41ac4fd73654ec
parent11b46661613f847cd0c4070baa2d33c9ff2f3fcd
hw/ide/pci: Remove dead code from bmdma_prepare_buf()

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>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[PMD: Break and return once at EOF]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240805182419.22239-1-philmd@linaro.org>
hw/ide/pci.c