From 5c17ca2505197c56d0097c66a4e5bda4d6f32fb6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 7 Oct 2009 01:16:01 +0200 Subject: Clean up test for qdev_init() failure Some callers test for != 0, some for < 0. Normalize to < 0. Patchworks-ID: 35171 Signed-off-by: Markus Armbruster Signed-off-by: Anthony Liguori --- hw/parallel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/parallel.c') diff --git a/hw/parallel.c b/hw/parallel.c index 2635edcaf..92eecb152 100644 --- a/hw/parallel.c +++ b/hw/parallel.c @@ -493,7 +493,7 @@ ParallelState *parallel_init(int index, CharDriverState *chr) qdev_prop_set_uint32(&dev->qdev, "iobase", isa_parallel_io[index]); qdev_prop_set_uint32(&dev->qdev, "irq", 7); qdev_prop_set_chr(&dev->qdev, "chardev", chr); - if (qdev_init(&dev->qdev) != 0) + if (qdev_init(&dev->qdev) < 0) return NULL; return &DO_UPCAST(ISAParallelState, dev, dev)->state; } -- cgit v1.2.3-65-gdbad