From nobody Tue Feb 10 09:24:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1636373941; cv=none; d=zohomail.com; s=zohoarc; b=BclMUEMR+UMvevzorx90jIcl7REhFsqn/l8TPuadjexjP3jowwclQ4h+biV5mP+L1uSKxOZyBQzd429Lb/DM5unRRIfTnMyw29ouKxp/ATnDQZwIIjKXNbdEWsad5GD6cKzQImkZAJZZja89yrX1eLpdJftqwLlcwKcvZea2GLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636373941; 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=T2MA581d/YB4ZLUDi1H7BclZ7GGSuUSlIWkr0bHdIg0=; b=Pb4x5scpPKIJjDodSW08qrntmfLvlWjGVL7C0vY2UkEoLHxuJpK0ZMi1j9GCzfpWCj+W3jSunUfcoxGSpODcQu7+Rnl2BmSv9z1sbWlQiAv5JoSfNVJclrCt5VJ8RXbjwfqymsu28dyFV+fx6r+loaTwMpEnbBOl+BdpmF00ySQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1636373941182891.508445782701; Mon, 8 Nov 2021 04:19:01 -0800 (PST) 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-440-QbxGjiNFOcW5ZxhHrc8LEQ-1; Mon, 08 Nov 2021 07:18:56 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A3C2824F87; Mon, 8 Nov 2021 12:18:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19D344180; Mon, 8 Nov 2021 12:18:52 +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 9A0161832DD9; Mon, 8 Nov 2021 12:18:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A8CIoO5011864 for ; Mon, 8 Nov 2021 07:18:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id C25201816A; Mon, 8 Nov 2021 12:18:50 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.193.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id 179CC5DF5D; Mon, 8 Nov 2021 12:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636373940; 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=T2MA581d/YB4ZLUDi1H7BclZ7GGSuUSlIWkr0bHdIg0=; b=LZnag+fPefkAPuxuDlFknyQN/UqeozWyMr3zxfYXX/6dbGxQhRm3VFT1g/KpqdvTN/KQmQ w0dw6mfwuQafMZAjz3HYfR52efDV+S15Zv/JzwsPE6NXXs2Gar9C85ciLTkN/+YCYcx+FV A8KMvozdCFhShhY2YZfcqmuwlZ04P8g= X-MC-Unique: QbxGjiNFOcW5ZxhHrc8LEQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/10] virSCSIVHostOpenVhostSCSI: Cleanup Date: Mon, 8 Nov 2021 13:17:37 +0100 Message-Id: <20211108121740.98621-8-twiederh@redhat.com> In-Reply-To: <20211108121740.98621-1-twiederh@redhat.com> References: <20211108121740.98621-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1636373942124100001 Content-Type: text/plain; charset="utf-8" Remove unnecessary label, goto, and closing of not-open file descriptor. Signed-off-by: Tim Wiederhake --- src/util/virscsivhost.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index afbfddb0fb..487301ab64 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -90,15 +90,10 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd) =20 if (*vhostfd < 0) { virReportSystemError(errno, _("Failed to open %s"), VHOST_SCSI_DEV= ICE); - goto error; + return -1; } =20 return 0; - - error: - VIR_FORCE_CLOSE(*vhostfd); - - return -1; } =20 =20 --=20 2.31.1