Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1535610pxb; Thu, 16 Sep 2021 09:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3o9UCmUWuGjuAx891o0NeK9rR/ApEXIKLeY1PcsqlPviX69+9VvgrGKbpJKl2sEpOYsIk X-Received: by 2002:a05:6402:1a2f:: with SMTP id be15mr7490671edb.246.1631809544088; Thu, 16 Sep 2021 09:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809544; cv=none; d=google.com; s=arc-20160816; b=ZDk+sjIMRY8x0T2cKw+/Wy79al3+mA5I69m03TIuOQQUF2pucUd8H8jf9b6G0/Jh7Z PrT1IAtG4q0Qfrn94m12otvR/vsCSj3olYA2k2OoXBiN+jkdPoOf00qfCEeWjbfk/Mhe 9fJij5KCFq5dukFG1PIrviGucWmqZwTtetVeUZg2IzmGZMya0zw/1ksmRZ3Ug5sUQ4Ga MZPFxMx+wiH9QI/xypdM+4oGYXmPRyMu1rut+ng4QOrLoupEZ0fmT63wjYjylPlbHzzu aIBjvm3nVfRmAszUA9NrbItgOFunjtA5S+ga6UxGXjyPQYCwqfPbdE0sTIaVVR3vvXvH 1Ufw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dpOzOjNq5H7gcMiFYu+SkyVVFZmcKsWrqsaYZkL3Rpk=; b=gBX++jxKbx9/xseiNMDCbf6tIjvlVYSwj9S4UkEnxrthKkeHYjxJmWZRPCz96buxzK NmwgArCQZckqEOR17gdN3P72YglpScwuiWSAxMtv9alpp2HDkSbJfJHZPQVKutF4AN9h B1T8HsL8Y0RzUAH5gIWsETeWLsCdQSrsMr6lxgUJnUswGlZ0T1D7Q5CtBAD8z5rn4NP5 b5htfY4RGB6q+GXvC7kVnXygmYKGiv1PqSqw1mYYS3VojveSo3PJjHFB0gTbv5yy3lAs if7v6gbN96q+WA2BzZIKWWpJ3ZR0zngXFnT9Sg+/aTinOIyjgJFFxYBsT1UaWXcfNXHl VjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p3CtTbgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si4870299ejy.557.2021.09.16.09.25.15; Thu, 16 Sep 2021 09:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p3CtTbgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234769AbhIPQXp (ORCPT + 99 others); Thu, 16 Sep 2021 12:23:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:48850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237698AbhIPQNM (ORCPT ); Thu, 16 Sep 2021 12:13:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4279361391; Thu, 16 Sep 2021 16:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808586; bh=reU0cyggiRXlCOoC8r79/ZpqbrPAprKiA8MNgItW210=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p3CtTbgJhsO8NUbbFLYtHrcRwsaNDKDzKejh5KOpLErM0Gcj+pVYKpsNWL/9PWJEK KmJqNHX6hXJkDjs1PO2Hw4eMDsip6VlvquDp0SYVukjNNtdSMRGrHM/7x76vGA2X1Z WeAmf5flVKXQamDi6QMBInNRk/vUommijbyIUldw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan , Sasha Levin Subject: [PATCH 5.10 140/306] selftests: firmware: Fix ignored return val of asprintf() warn Date: Thu, 16 Sep 2021 17:58:05 +0200 Message-Id: <20210916155758.821178399@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan [ Upstream commit fe968ca2cac91888310b143a483123c84906e3fc ] Fix the following ingonred return val of asprintf() warn during build: cc -Wall -O2 fw_namespace.c -o ../tools/testing/selftests/firmware/fw_namespace fw_namespace.c: In function ‘main’: fw_namespace.c:132:2: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 132 | asprintf(&fw_path, "/lib/firmware/%s", fw_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20210708031827.51293-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- tools/testing/selftests/firmware/fw_namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/firmware/fw_namespace.c b/tools/testing/selftests/firmware/fw_namespace.c index 5ebc1aec7923..817b2f1e8ee6 100644 --- a/tools/testing/selftests/firmware/fw_namespace.c +++ b/tools/testing/selftests/firmware/fw_namespace.c @@ -129,7 +129,8 @@ int main(int argc, char **argv) die("mounting tmpfs to /lib/firmware failed\n"); sys_path = argv[1]; - asprintf(&fw_path, "/lib/firmware/%s", fw_name); + if (asprintf(&fw_path, "/lib/firmware/%s", fw_name) < 0) + die("error: failed to build full fw_path\n"); setup_fw(fw_path); -- 2.30.2