From nobody Sat May 4 01:54:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1574884420; cv=none; d=zohomail.com; s=zohoarc; b=J3w/m4EYkkQHYofQE8dFJveMekPK9hPv/VhrGaHrtGraEnk3AXhDSThVg4CwntLNqFMjGUmzy4JLAVzu0zIqB57v/AlK04b0kpFx6VHHWcXWESvPD4Y0zda//zL8YD1fd6TCUhsQSI/eE49f2LSc7QoftZ6eMyW/nizjcSKT91I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574884420; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=bJ91Df+eeJgrAQ1UVaVkU6JGgbAwF0b9d469AgHonq0=; b=KWn7+yOtBNRGRzjLXJHF1XvrWUVyxeW33sq+rDLpMauM5P34PNrDKOEUoV8Ych6zc96df3+Zct8vLcNw0LNJUu1lciHMxcfg9Cf7eyPOn+jCIqKx606PxZuwKEnz33F6fkWCj1PZ1fZbKAk3NGR8rSpE6ALyt8pBAe9q9SjTX5k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1574884420293778.5637948486191; Wed, 27 Nov 2019 11:53:40 -0800 (PST) Received: from localhost ([::1]:42886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ia3Na-0003aj-8T for importer@patchew.org; Wed, 27 Nov 2019 14:53:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54599) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ia3LY-00021a-8z for qemu-devel@nongnu.org; Wed, 27 Nov 2019 14:51:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ia3LX-0005TR-7p for qemu-devel@nongnu.org; Wed, 27 Nov 2019 14:51:32 -0500 Received: from relay.sw.ru ([185.231.240.75]:55610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ia3LT-0005I7-I8; Wed, 27 Nov 2019 14:51:27 -0500 Received: from vovaso.qa.sw.ru ([10.94.3.0] helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1ia3LI-0004gM-F0; Wed, 27 Nov 2019 22:51:16 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-s390x@nongnu.org Subject: [PATCH v6] hw/vfio/ap: drop local_err from vfio_ap_realize Date: Wed, 27 Nov 2019 22:51:16 +0300 Message-Id: <20191127195116.30636-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: akrowiak@linux.ibm.com, vsementsov@virtuozzo.com, pmorel@linux.ibm.com, cohuck@redhat.com, qemu-devel@nongnu.org, pasic@linux.ibm.com, borntraeger@de.ibm.com, alex.williamson@redhat.com, marcandre.lureau@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" No reason for local_err here, use errp directly instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster --- v6: keep return code checking [Cornelia] hw/vfio/ap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index da6a20669d..8fbaa724c2 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -89,14 +89,13 @@ static void vfio_ap_realize(DeviceState *dev, Error **e= rrp) { int ret; char *mdevid; - Error *local_err =3D NULL; VFIOGroup *vfio_group; APDevice *apdev =3D AP_DEVICE(dev); VFIOAPDevice *vapdev =3D VFIO_AP_DEVICE(apdev); =20 - vfio_group =3D vfio_ap_get_group(vapdev, &local_err); + vfio_group =3D vfio_ap_get_group(vapdev, errp); if (!vfio_group) { - goto out_err; + return; } =20 vapdev->vdev.ops =3D &vfio_ap_ops; @@ -113,7 +112,7 @@ static void vfio_ap_realize(DeviceState *dev, Error **e= rrp) */ vapdev->vdev.balloon_allowed =3D true; =20 - ret =3D vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err); + ret =3D vfio_get_device(vfio_group, mdevid, &vapdev->vdev, errp); if (ret) { goto out_get_dev_err; } @@ -123,8 +122,6 @@ static void vfio_ap_realize(DeviceState *dev, Error **e= rrp) out_get_dev_err: vfio_ap_put_device(vapdev); vfio_put_group(vfio_group); -out_err: - error_propagate(errp, local_err); } =20 static void vfio_ap_unrealize(DeviceState *dev, Error **errp) --=20 2.21.0