From patchwork Fri Mar 31 07:36:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 745522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vvYML6dPSz9rxl for ; Fri, 31 Mar 2017 18:40:46 +1100 (AEDT) Received: from localhost ([::1]:39361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctrAq-0003Xc-Gz for incoming@patchwork.ozlabs.org; Fri, 31 Mar 2017 03:40:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctr7b-0001N3-LW for qemu-devel@nongnu.org; Fri, 31 Mar 2017 03:37:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctr7a-0006zG-Rv for qemu-devel@nongnu.org; Fri, 31 Mar 2017 03:37:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctr7a-0006z6-MV for qemu-devel@nongnu.org; Fri, 31 Mar 2017 03:37:22 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A477B61B93; Fri, 31 Mar 2017 07:37:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A477B61B93 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A477B61B93 Received: from pxdev.xzpeter.org.com (ovpn-8-59.pek2.redhat.com [10.72.8.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8D0618E21; Fri, 31 Mar 2017 07:37:15 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 31 Mar 2017 15:36:31 +0800 Message-Id: <1490945793-21276-4-git-send-email-peterx@redhat.com> In-Reply-To: <1490945793-21276-1-git-send-email-peterx@redhat.com> References: <1490945793-21276-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 31 Mar 2017 07:37:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.10 3/5] util: propagate error for device_func_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tianyu.lan@intel.com, kevin.tian@intel.com, yi.l.liu@intel.com, "\\ Michael S . Tsirkin \\ " , Jason Wang , Markus Armbruster , peterx@redhat.com, Marcel Apfelbaum , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We have error_propagate(). Use it. Signed-off-by: Peter Xu --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index b97b32a..b18bde7 100644 --- a/vl.c +++ b/vl.c @@ -2304,7 +2304,7 @@ int device_init_func(void *opaque, QemuOpts *opts, Error **errp) dev = qdev_device_add(opts, &err); if (!dev) { - error_report_err(err); + error_propagate(errp, err); return -1; } object_unref(OBJECT(dev));