From 7353153891a9bbdbaa1672c37208effb5a09d715 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sat, 5 Feb 2011 14:56:53 +0000 Subject: [PATCH] parallel: make optional Ignore failure with parallel device creation. Signed-off-by: Blue Swirl --- hw/pc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/pc.h b/hw/pc.h index 443ba34d16..f823b7d25a 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -24,7 +24,10 @@ static inline bool parallel_init(int index, CharDriverState *chr) { ISADevice *dev; - dev = isa_create("isa-parallel"); + dev = isa_try_create("isa-parallel"); + if (!dev) { + return false; + } qdev_prop_set_uint32(&dev->qdev, "index", index); qdev_prop_set_chr(&dev->qdev, "chardev", chr); if (qdev_init(&dev->qdev) < 0) { -- 2.11.4.GIT