diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-01-15 19:01:03 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-01-24 16:41:49 +0100 |
commit | 1635eecc413ed680013cf77e6994901cafe15590 (patch) | |
tree | 7fd534ac118856b0e70223b50af19c8a64bb6e86 /hw/ide | |
parent | 3de0a2944bdb3047dce275560631834bcb4afe22 (diff) | |
download | qemu-1635eecc413ed680013cf77e6994901cafe15590.zip qemu-1635eecc413ed680013cf77e6994901cafe15590.tar.gz qemu-1635eecc413ed680013cf77e6994901cafe15590.tar.bz2 |
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>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/pci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 987caff..35168cb 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); |