From nobody Sun Feb 8 16:49:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1571737187; cv=none; d=zoho.com; s=zohoarc; b=aDFmJKZ3b7WlnyIpvey2+t9gzY3oSPFqAAWOZP+XmgkOMJ5v1L9ChOrl6rEWWlCuqEfi+mYJTBE0bOstXLjWmBHySVKCSVPSyNxWy6LkQu2bnfYwEw3fDC31MvTgcl4VMZIP2USelAHNh+nlAG7vpE8xFzvI8O2QsJ2KqV76QEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571737187; h=Content-Type: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=S3puQgj6ypVeCZRJ0jc2G6w9+RIs14Q8ehxbmdqDNCU=; b=VVTQh7bE+sgw8euUX6+LIf8aNhfqm9rwd9q673s3b+ZpdO14D5s+P5JPJfNc6xDuw2TI40laTGCeEjJZ7frpwBHlIVym1bM9Kd4id3BQypwhHswb6H9rH6Sfvqm2Hn1R0uJih3+0esXhk2hJRQ4932J9LJHCzuNktsXAgsl4sDI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571737187899506.28908697669715; Tue, 22 Oct 2019 02:39:47 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-Bo9LZyaqM12AzIgNrIkuow-1; Tue, 22 Oct 2019 05:39:44 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 493975EE; Tue, 22 Oct 2019 09:39:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E66E1001DC0; Tue, 22 Oct 2019 09:39:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 520CB1A502; Tue, 22 Oct 2019 09:39:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9LIJvV8000734 for ; Mon, 21 Oct 2019 14:19:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1DEAD61364; Mon, 21 Oct 2019 18:19:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx25.extmail.prod.ext.phx2.redhat.com [10.5.110.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 074F160BDB for ; Mon, 21 Oct 2019 18:19:56 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C54BB10973A3 for ; Mon, 21 Oct 2019 18:19:55 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id m15so22545093qtq.2 for ; Mon, 21 Oct 2019 11:19:55 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:7979:d16f:4e5e:8e8d:1141]) by smtp.gmail.com with ESMTPSA id d205sm9248741qke.96.2019.10.21.11.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 11:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571737186; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=S3puQgj6ypVeCZRJ0jc2G6w9+RIs14Q8ehxbmdqDNCU=; b=JPUnQ5+LRTAD8Am07CIa0i9nYBUHctMwuRPkQ7lJx6q8h4QVaW3oRG9tZJcYi2LE4dhMvK pU7TmLo0Pl2Y36bFIvS9Hi8jULOblGPaEoXNAIBxPM/C3HqhGnqGY9hrGVRDwTQdFbYG6N fRaiFVz5GVrTv+74CCHwGvDhza4Dk4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=++o/UqUqQb9Pe0ViXqGtOBJp3UMCFx3y/NhuOmh/6tc=; b=W1dNKyJk5rEEESTNGqHOFHOT0gSny89MaeHToAAvhjMXOWSoowds85Bn1HoceU4kNb K8W2K7P7fWxDV+iCYoRsGRjOiS85wfwfIWrTifOXQtHPe4wJBpLQrTQN4IMpQa3ihFRd tN/kqWZMMwT2z5B7WLKZ0aSeOVotfLQpjnn82eH05d7dIMRnEWdLfj38GwazeZ6fwx7v 6HYxFYKNj4pMIaihBdqdYxzax8LQklKvmPwR6X+ChNjoix+4BTFqp6B7PTnUjOGXvF24 4HFotk39Qni/D3fA7wBBlq6+x4P2iJ4M/QK4KN+l/JzrjYEGp0+6DuG2XpCCHMhOn/gn ueJQ== X-Gm-Message-State: APjAAAXVnv3OO6A2g/QMohdcLSrPL1jKYkb016V2oeMLecFCvrc6+IE+ nTXG7Dy0sPt5YX2almaCE3PrfhXx3gs= X-Google-Smtp-Source: APXvYqy/U6jqleUrq92SJIebnL5V6jj/oaT0YKIyKAVbkqwq3xI3c3Q+6I3NeMxkJDifRBRQftvoaA== X-Received: by 2002:ac8:714c:: with SMTP id h12mr2008969qtp.231.1571681994881; Mon, 21 Oct 2019 11:19:54 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 21 Oct 2019 15:19:11 -0300 Message-Id: <20191021181911.14986-22-danielhb413@gmail.com> In-Reply-To: <20191021181911.14986-1-danielhb413@gmail.com> References: <20191021181911.14986-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 21 Oct 2019 18:19:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 21 Oct 2019 18:19:55 +0000 (UTC) for IP:'209.85.160.171' DOMAIN:'mail-qt1-f171.google.com' HELO:'mail-qt1-f171.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.15 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.160.171 mail-qt1-f171.google.com 209.85.160.171 mail-qt1-f171.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.66 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 21/21] bhyve_device.c: remove unneeded cleanup labels X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: Bo9LZyaqM12AzIgNrIkuow-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_device.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c index 4913be8422..ddbe20d31d 100644 --- a/src/bhyve/bhyve_device.c +++ b/src/bhyve/bhyve_device.c @@ -36,7 +36,6 @@ bhyveCollectPCIAddress(virDomainDefPtr def G_GNUC_UNUSED, virDomainDeviceInfoPtr info, void *opaque) { - int ret =3D -1; if (info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) return 0; =20 @@ -56,12 +55,10 @@ bhyveCollectPCIAddress(virDomainDefPtr def G_GNUC_UNUSE= D, =20 if (virDomainPCIAddressReserveAddr(addrs, addr, VIR_PCI_CONNECT_TYPE_PCI_DEVICE, 0)= < 0) { - goto cleanup; + return -1; } =20 - ret =3D 0; - cleanup: - return ret; + return 0; } =20 virDomainPCIAddressSetPtr @@ -169,13 +166,11 @@ int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, virDomainPCIAddressSetPtr addrs =3D NULL; bhyveDomainObjPrivatePtr priv =3D NULL; =20 - int ret =3D -1; - if (!(addrs =3D bhyveDomainPCIAddressSetCreate(def, 1))) - goto cleanup; + return -1; =20 if (bhyveAssignDevicePCISlots(def, addrs) < 0) - goto cleanup; + return -1; =20 if (obj && obj->privateData) { priv =3D obj->privateData; @@ -188,10 +183,7 @@ int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, } } =20 - ret =3D 0; - - cleanup: - return ret; + return 0; } =20 int bhyveDomainAssignAddresses(virDomainDefPtr def, virDomainObjPtr obj) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list