From: Stefan Weil Date: Sat, 15 Jan 2011 18:01:03 +0000 (+0100) Subject: ide: Remove unneeded null pointer check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1635eecc413ed680013cf77e6994901cafe15590;p=qemu.git 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 Signed-off-by: Stefan Weil Signed-off-by: Kevin Wolf --- diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 987caffa3a..35168cb469 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -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);