From nobody Tue Feb 10 10:54:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1618004009; cv=none; d=zohomail.com; s=zohoarc; b=d4kwGVEW/XHTlHHzBUGwFja3p6GAR+sqjWvXhlPK5O+dk5UUbUg/1Ka3Yhw1ejyL4POzGZ3+9ENBV7d7IIdhASJWlcIWjCCIm/KOF6I4tiAcBpwgwM21xI7KS2PmQT4m/JlNx19lxD0mCCxKQU0GOO7J/w7SxP22fiuuEBZs0HA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618004009; 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=NB2m9s3/7qisLpLb1JeHlkx25FVIV+hHJkXqwmqapA8=; b=FJVdSFCuI1mB3FmwqEK/dx63xvAc1NiLJcpePL5OW2OFC7gGsgP6w0ZO+/MddtQCFjiwVPsi3lmZMX0/cAxaSv6A1CzBjdpIPUhbfe1pSszxHgwdkcVwrSmQvH3HCqq7SRgR0sZv5tcTauPkFafxxcr6nqViwjQl6zHfEC22Wv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618004009098117.95038580605899; Fri, 9 Apr 2021 14:33:29 -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-291-bYA3yJvGOyuFcTNhdmRsrA-1; Fri, 09 Apr 2021 17:33:24 -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 E521D814337; Fri, 9 Apr 2021 21:33:18 +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 542F31007604; Fri, 9 Apr 2021 21:33:17 +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 5E7271806D10; Fri, 9 Apr 2021 21:33:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 139LXC9A032603 for ; Fri, 9 Apr 2021 17:33:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 086355D6AD; Fri, 9 Apr 2021 21:33:12 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF02F5D6A1 for ; Fri, 9 Apr 2021 21:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618004007; 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=NB2m9s3/7qisLpLb1JeHlkx25FVIV+hHJkXqwmqapA8=; b=SApeVhE6ss4KZ8Elh7hKxufkGx+RLHcmfR+5eXc2sd0QeD5mJOIKGTQ+aEemjVXJgTGxPN K9EHqUUSjy9RHtWouvzDjhWITG88NFi44vvkRx5utb/O7BbdOrj5VNMfTlxDtQGawsYhJb JEfSRNqqvxpfZyso2XdfEzqpLySl/ew= X-MC-Unique: bYA3yJvGOyuFcTNhdmRsrA-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH 01/11] nodedev: don't log error in nodeDeviceFindAddressByName() Date: Fri, 9 Apr 2021 16:32:56 -0500 Message-Id: <20210409213306.3971286-2-jjongsma@redhat.com> In-Reply-To: <20210409213306.3971286-1-jjongsma@redhat.com> References: <20210409213306.3971286-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.22 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) Content-Type: text/plain; charset="utf-8" The calling function will log the error. Just return NULL if a device cannot be found. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index c11b8d89ab..cb90401d0a 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -630,11 +630,8 @@ nodeDeviceFindAddressByName(const char *name) char *addr =3D NULL; virNodeDeviceObjPtr dev =3D virNodeDeviceObjListFindByName(driver->dev= s, name); =20 - if (!dev) { - virReportError(VIR_ERR_NO_NODE_DEVICE, - _("could not find device '%s'"), name); + if (!dev) return NULL; - } =20 def =3D virNodeDeviceObjGetDef(dev); for (caps =3D def->caps; caps !=3D NULL; caps =3D caps->next) { --=20 2.26.3