Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1145211pxv; Fri, 9 Jul 2021 19:26:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCXQ0hxL3vab5SVldbmCD978tWOaGq+f3mPSdwkv7if97D3z6HtVZy3V0xEvrrs6gZSJZB X-Received: by 2002:a05:6402:516c:: with SMTP id d12mr6823611ede.323.1625884019364; Fri, 09 Jul 2021 19:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884019; cv=none; d=google.com; s=arc-20160816; b=G8m3Z6UB+9EnhLFDtGhoB47pQMZqAZBC5E4A/T41txnUnuAY3m2yaSW5DC0TgwchJG a5R+GKmHWQclpmH2lGm1G6LEOSvRGz03SLZMIKxo6HUa4fYAa2+pGZQdXXFRJcMOYMHG PXKL2zQtYRrQRhXQAjSNV7YEI8IZkomjUtAR/U4+ablbM0MJaLuxb3CA1NYYjPOd4Fa+ CfOdxGfJ2KXXZWFkCQd2EcHwgcHAsGWNl8PSn7G1HGyMenIP/wr3QPJdWUSykHQvuxmz oxBSXTcea45ZhErqmFomZb/kSFTz+7kL7+eXM0/pVuYRdISHsTXmp4ksBqEtWVXDfLRz vfag== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gHfqUDq2GJ9j5kucGaNpUEHlAqOHLtUQB2tJXp+ttl8=; b=q19biZJFdgfEJNea4efyxr/vtZ1KeFsgK9mzLuHF9fzKpg4jew88i/xSt4hNdRTz3r vNrm6V45eStYKfcP5C5gmxQa40z0mDZ1Wjng0EYN3/wnY7d8enI+SMyXCHxH3iBmCHQD afRK+q8HSu1fUNshgg9j3DbBVf5tlayVKIQtK0vM12+b/FXnlF0+qSmiJT8dIxXe11ML fUg81nsD+NGePJIaBk11tanh00/Q5ve/P+HrBWA8x4JGr/NGHvI6zgHcVEY4CAvzWTdv RuxylVkYFKVOKItan2OzMimKS1m0lgMIMFW8teVRuLG5jONUpQXXrddEshiUV1/VWT/n aWiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kwRvFa9j; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si8539832ejf.364.2021.07.09.19.26.36; Fri, 09 Jul 2021 19:26:59 -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=@kernel.org header.s=k20201202 header.b=kwRvFa9j; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233022AbhGJC1t (ORCPT + 99 others); Fri, 9 Jul 2021 22:27:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:41906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233541AbhGJC03 (ORCPT ); Fri, 9 Jul 2021 22:26:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3BE7F61402; Sat, 10 Jul 2021 02:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883822; bh=7wFhkZ0IlNgtCAhPr5ZrgV3HSP2CLK9OONDhD4XycyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kwRvFa9jS1tzZENhCVvzN6nyu6BYvHIMDdTgXMMrXcnDdZ8R1SncPjSKHLSoWxlO7 hDNiNxSR10EBQcwhPaX4fEkGNsZYSk+AgmhwN2epn+kEqnsSkYxIs+mJSy5///7Fav J8f5o0Yzm3w2NQL3aG5s7HAOonKUHw5LyM7GpbsSfiYpy3U7VyM3Wp2BM/RC7lBsUD LTJvzuAFc4fd/L38pksOkF24ny9VpTLOLcgEd4ZhD4KhgZEjwO+P+TwV1GsgGztGAD PQrqQGVWTNzl2VzoCNXbIWXRha0qLwZOYyPIwd0NWUbL3To+/SI8wxoBQ1qFZ40NcW DgHiIicvO6TzQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhen Lei , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.12 071/104] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Fri, 9 Jul 2021 22:21:23 -0400 Message-Id: <20210710022156.3168825-71-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhen Lei [ Upstream commit 7d3865a10b9ff2669c531d5ddd60bf46b3d48f1e ] When devm_kcalloc() fails, the error code -ENOMEM should be returned instead of -EINVAL. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210617103729.1918-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6680c12716d4..6d4b08e918de 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2796,7 +2796,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, if (!routes) { dev_err(card->dev, "ASoC: Could not allocate DAPM route table\n"); - return -EINVAL; + return -ENOMEM; } for (i = 0; i < num_routes; i++) { -- 2.30.2