From nobody Sun Feb 8 15:46:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=1570814906; cv=none; d=zoho.com; s=zohoarc; b=SuFZxxk9gNJqLqbaoU4drqrvLowiyeJMBtTOOcpX/ZikvWO9CINPGozI2vhRa9WH/XfQsX3IQttAwmvY8ousltMmrHcohMJVfxhdNIjdftUJ5p6CXUKRgR6pLhSqI8cXwC5B3E5too0JcJySRkEQzf3TnUqAULJvGNACdJN9BWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570814906; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Yih2rhbeXpBnPejRxqq39pULduiYsGVJ11yQ9jfXawI=; b=od3yRBGeFy6d20iadvAHs8arWkHIvk33QDuGlcbyzqBt/ZTjNF9mGyrl+lWGZvHLvohkIPDI8OwjOoFc01U2SxT619n4XzWAEYQU+nfMFVh/c9H4+pseStSWWBY3DVmz2lLJ21bbn8sCFQJyEd1hs/vibYUMZc4WSadJFWVH/oY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1570814906789801.9947962504358; Fri, 11 Oct 2019 10:28:26 -0700 (PDT) Received: from localhost ([::1]:54656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIyiH-0006e0-F2 for importer@patchew.org; Fri, 11 Oct 2019 13:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36440) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxQy-0006It-4n for qemu-devel@nongnu.org; Fri, 11 Oct 2019 12:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIxQw-0004Vh-QX for qemu-devel@nongnu.org; Fri, 11 Oct 2019 12:06:27 -0400 Received: from relay.sw.ru ([185.231.240.75]:47894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iIxQw-00047A-JD; Fri, 11 Oct 2019 12:06:26 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iIxQb-0003XG-3k; Fri, 11 Oct 2019 19:06:05 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [RFC v5 023/126] hw/vfio/ap: drop local_err from vfio_ap_realize Date: Fri, 11 Oct 2019 19:04:09 +0300 Message-Id: <20191011160552.22907-24-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191011160552.22907-1-vsementsov@virtuozzo.com> References: <20191011160552.22907-1-vsementsov@virtuozzo.com> 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: Tony Krowiak , vsementsov@virtuozzo.com, Pierre Morel , qemu-s390x@nongnu.org, Cornelia Huck , armbru@redhat.com, Halil Pasic , Christian Borntraeger , Alex Williamson 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: Marc-Andr=C3=A9 Lureau --- hw/vfio/ap.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index da6a20669d..db816e1860 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -87,16 +87,14 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapde= v, Error **errp) =20 static void vfio_ap_realize(DeviceState *dev, Error **errp) { - 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,18 +111,10 @@ static void vfio_ap_realize(DeviceState *dev, Error *= *errp) */ vapdev->vdev.balloon_allowed =3D true; =20 - ret =3D vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err); - if (ret) { - goto out_get_dev_err; - } - - return; + vfio_get_device(vfio_group, mdevid, &vapdev->vdev, errp); =20 -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