From nobody Sat Apr 12 11:05:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516625063797423.89974765234433; Mon, 22 Jan 2018 04:44:23 -0800 (PST) Received: from localhost ([::1]:40055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edbSY-00020R-UV for importer@patchew.org; Mon, 22 Jan 2018 07:44:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edbPF-00087u-7I for qemu-devel@nongnu.org; Mon, 22 Jan 2018 07:40:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edbPB-0002bD-A3 for qemu-devel@nongnu.org; Mon, 22 Jan 2018 07:40:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38264) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edbPB-0002aZ-3o for qemu-devel@nongnu.org; Mon, 22 Jan 2018 07:40:53 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A5A878EC1; Mon, 22 Jan 2018 12:40:52 +0000 (UTC) Received: from localhost (ovpn-116-110.ams2.redhat.com [10.36.116.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F7865C262; Mon, 22 Jan 2018 12:40:37 +0000 (UTC) From: Stefan Hajnoczi To: Date: Mon, 22 Jan 2018 12:40:32 +0000 Message-Id: <20180122124033.21440-2-stefanha@redhat.com> In-Reply-To: <20180122124033.21440-1-stefanha@redhat.com> References: <20180122124033.21440-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 22 Jan 2018 12:40:52 +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] [PULL 1/2] hw/block: Use errp directly rather than local_err 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: Kevin Wolf , Peter Maydell , Mao Zhongyi , "Michael S. Tsirkin" , Markus Armbruster , Max Reitz , Keith Busch , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Mao Zhongyi Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc: Keith Busch Cc: Stefan Hajnoczi Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Markus Armbruster Signed-off-by: Mao Zhongyi Reviewed-by: Stefan Hajnoczi Message-id: e77848d3735ba590f23ffbf8094379c646c33d79.1511317952.git.maozy.f= nst@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index b1532e4e91..58a5def75d 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -913,7 +913,6 @@ static void virtio_blk_device_realize(DeviceState *dev,= Error **errp) VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); VirtIOBlock *s =3D VIRTIO_BLK(dev); VirtIOBlkConf *conf =3D &s->conf; - Error *err =3D NULL; unsigned i; =20 if (!conf->conf.blk) { @@ -966,9 +965,7 @@ static void virtio_blk_device_realize(DeviceState *dev,= Error **errp) for (i =3D 0; i < conf->num_queues; i++) { virtio_add_queue(vdev, conf->queue_size, virtio_blk_handle_output); } - virtio_blk_data_plane_create(vdev, conf, &s->dataplane, &err); - if (err !=3D NULL) { - error_propagate(errp, err); + if (!virtio_blk_data_plane_create(vdev, conf, &s->dataplane, errp)) { virtio_cleanup(vdev); return; } --=20 2.14.3