Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9252702pxu; Mon, 28 Dec 2020 10:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6Bol6+oBls/nZ7dDe0KobIn4sISRi5PUKtnDvQjOBcHAt+/Inpvugcu2IoS8ZxxIGhqTe X-Received: by 2002:a17:907:b09:: with SMTP id h9mr43443039ejl.155.1609180206808; Mon, 28 Dec 2020 10:30:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609180206; cv=none; d=google.com; s=arc-20160816; b=O/4POAjJ6bBE7RsoyKHnlnuJ5xPEZKN+Xo2q8f2oa4zXtZrk69kOz6/eiy0lZ6CSnZ MACdKsKsaYhtiZWGVHoArDl662tnjyVBRjCF6EM9VVyRqWIMtmueEc7NY0D2Cu+nk26O oHuMeNH9mPGIPhQ6rGAMi3TU/QOR6PHgLU6i8S7/Hr+4uh5cEBYMo5SBJUaSWbLymAlf JRy5X613aS385gFu5tUCkhquM27q0jwRdKNze2tFbvD79UgbQjxD+7T4SLdWhYsKq+BV NVKiAtCDU9zfhPXkMgNsaZymqdkQYxVVuDtwAk1it/XgU4TQR/Zfvyoy7XutKFpgMe13 YqOw== 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=oLaUSJWQJiOEyHCwh+6TnROZsIqc61L1YUXLQ/Mmivc=; b=B8dcuM2CvWTOxewRi4SGP6dIkljcnyHkIfOMzO8vUlFOZq92lJEh/3OIrIxiTYokvG 4wxL17lh+uR6TVbT1tjgzTRs7UaHnXUte5kzIyn0jmVbi6e8pvtY3yIqBz8/0OUJ/VD+ ffWNza59V1qNEH0eYg/sAtsp8Q1xTwxKV3rRCkpavbsyDC4w9gCTOsFgc+vN0kPJ0tj1 M2hlZfTTgjwlmACJvWlzsHcBLcMN9buvUXjOeD2zkp8uIwsyPlFkHXnks3TiqaguYW2F O6GkT9mmpvrcbk/Um0+wbtwbBJTDrhbv9KTGI1XAojXWuY3jXulTyMfT6ujiqyodFjbi ZbBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FA9hefT7; 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 f24si20148266edq.247.2020.12.28.10.29.44; Mon, 28 Dec 2020 10:30:06 -0800 (PST) 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=FA9hefT7; 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 S2390309AbgL1Ndn (ORCPT + 99 others); Mon, 28 Dec 2020 08:33:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:33496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387819AbgL1Nc4 (ORCPT ); Mon, 28 Dec 2020 08:32:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF25422582; Mon, 28 Dec 2020 13:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162336; bh=cEH1ohLZUhbTG5A4vYlmMy+XmPUBtcJyo7fVo6bKm4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FA9hefT7L7RFjuRxcVWM18ySNd01qGttCA9MgIPcaZa6mgB1bdxE90tlq3ORSPi/B ZBBu0ihqatXOQdpO1SE1+YtVjwyI8eT8qlJnl4uD65SrZ8iRNmXi1UhEtGlrne8fp1 mflmYUE9HFmDpp/A2K/CvIQamf8gjrYanln9CXJ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 251/346] kconfig: fix return value of do_error_if() Date: Mon, 28 Dec 2020 13:49:30 +0100 Message-Id: <20201228124931.915987057@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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: Masahiro Yamada [ Upstream commit 135b4957eac43af2aedf8e2a277b9540f33c2558 ] $(error-if,...) is expanded to an empty string. Currently, it relies on eval_clause() returning xstrdup("") when all attempts for expansion fail, but the correct implementation is to make do_error_if() return xstrdup(""). Fixes: 1d6272e6fe43 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions") Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/preprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 5ca2df790d3cf..389814b02d06b 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -111,7 +111,7 @@ static char *do_error_if(int argc, char *argv[]) if (!strcmp(argv[0], "y")) pperror("%s", argv[1]); - return NULL; + return xstrdup(""); } static char *do_filename(int argc, char *argv[]) -- 2.27.0