mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ide: Remove unneeded null pointer check
With bm == NULL, other code in the same function would crash. This bug was reported by cppcheck: hw/ide/pci.c:280: error: Possible null pointer dereference: bm Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
+1
-3
@@ -267,9 +267,7 @@ static void bmdma_irq(void *opaque, int n, int level)
|
||||
return;
|
||||
}
|
||||
|
||||
if (bm) {
|
||||
bm->status |= BM_STATUS_INT;
|
||||
}
|
||||
bm->status |= BM_STATUS_INT;
|
||||
|
||||
/* trigger the real irq */
|
||||
qemu_set_irq(bm->irq, level);
|
||||
|
||||
Reference in New Issue
Block a user