From nobody Sun Feb 8 05:23:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1607593312; cv=none; d=zohomail.com; s=zohoarc; b=FVRkubqHNABHWV9oxiRcn9FKeIZGNbe7bK4X6fTIyfVwkPw8xv9/01k49FkOva8MR47iEfyFEVpyFOqKpObGnZADFAP4vxiBk6AiQ5PyVT04YsPn8DGJbmF6EKfQD2YnkP7q9Y9l6ihLnUiWk3AdPZ/lqY3TiozE7MiHlOsxQ04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607593312; h=Content-Type:Content-Transfer-Encoding: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=rGzQjLKz/9VoLf8Q6rWiJFlhECjpsDWxpe3+P63MJFY=; b=fIYKIwsAcHHLLw+JQZcZ8nt8YyR0Mqjk18DA+vlOHBnYhkEMnFiiV7a6RABPWwksju9llVkC+ip4PRsCAOsvy3OO3XaodLBHDrbnzeDk6I4CDshE/d9XWlhkkiwb5qVB72p+W8qm8nViWmB6w4nsaZeD+g4qNvCqbbiw9+5cVIw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1607593312559607.452641511717; Thu, 10 Dec 2020 01:41:52 -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-206-8bbAv4BjP3ujzxPrI23rYQ-1; Thu, 10 Dec 2020 04:41:49 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF3F71936B76; Thu, 10 Dec 2020 09:41:42 +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 C750719712; Thu, 10 Dec 2020 09:41:42 +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 91F604EEF6; Thu, 10 Dec 2020 09:41:42 +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 0BA9fJNg014844 for ; Thu, 10 Dec 2020 04:41:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 37F381346F; Thu, 10 Dec 2020 09:41:19 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF08C1E5 for ; Thu, 10 Dec 2020 09:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607593311; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=rGzQjLKz/9VoLf8Q6rWiJFlhECjpsDWxpe3+P63MJFY=; b=f2WAUeQdCIHo46WyfdXgQwTrfUvt2WvkWb9yDI5gNNtZ+uFpAQ2lAZL1VmyeF7UvsiWTAP 9GXVpuj+OyAM+nwQZOTxrDjoesq3D4Qm6OWXNQCxyUArdSxwHXv995Di0dwrkyP/avNZ7w ONPFkIoLgeJjOt8DaTq/3nnMjABwGA8= X-MC-Unique: 8bbAv4BjP3ujzxPrI23rYQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] hyperv: remove duplicit addr check Date: Thu, 10 Dec 2020 10:41:10 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We already check addr is not negative right after filling its value. There's no need to check it before using it too. Signed-off-by: J=C3=A1n Tomko Fixes: a7a1d1f59e8ba2d8a3ed920ef595ccdfb0d8feb6 --- src/hyperv/hyperv_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index c2c103aa3b..1200bf02ff 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -561,9 +561,6 @@ hypervDomainDefParsePhysicalDisk(hypervPrivate *priv, driveNumberStr =3D g_strdup_printf("%u", diskdrive->data->DriveNumber); virDomainDiskSetSource(disk, driveNumberStr); =20 - if (addr < 0) - goto cleanup; - if (controller->data->ResourceType =3D=3D MSVM_RASD_RESOURCETYPE_PARAL= LEL_SCSI_HBA) { for (i =3D 0; i < HYPERV_MAX_SCSI_CONTROLLERS; i++) { if (controller =3D=3D scsiControllers[i]) { --=20 2.26.2