Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1151504pxv; Fri, 9 Jul 2021 19:40:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/GVaKq0/nWKdPJEXKAwfhyTndduiWHKGqPonj20M2g9zwNmN1zGOn9tzRD6k8yicf/WJ7 X-Received: by 2002:a6b:7619:: with SMTP id g25mr29674173iom.151.1625884805698; Fri, 09 Jul 2021 19:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884805; cv=none; d=google.com; s=arc-20160816; b=MrrLO+vEkhUVl/v3VtABMlpTzoHMctQcqVDf9m+QnwHMVmV3Xa6ftLH2o2i4apOvFR s0puleMFBSi3IiOJQMStVMsj0+Yz7DN+olPsKwOWy5dusUjJVH1/YGiCneHhqSpMj9ck 0Et9/+VRZLpeVXVjBVeufmzmG7zQ20TusCRkf4hZthgBcJpJDbV9Yb0STtUE50efYF12 GMKdv2kuqdUQeqVsPR72odrg7Z2Z8sX5Q9GLOjgiDJ2nwQvE+O1/dy1wHCNlKFownRBb A+CeyFJmoINhjxaUOlV43LC7k8nKo6LZX4ghF8WTDLlABda12HjXakYA2Tqn+HCGTgcs Dj/g== 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=k1KWhNi1NLH3fn5m+piOq1woc1xKkg4bki0O6YF7hFw=; b=l+t/5bIoP89oIrnkzAZx0ud1ThoMiufjlewtGJJY+LdU3cMrP8TI1d+foKELqPP2Iz 4MJFNr/hS1Pz2ex59Azw7LhYpsVqawEDwCceKyUmtrC6ZNZa33Yp9T9WvQT97kV3VEjl cf83IjqekuPBz+O8fiIQYrR4KrWelJPuoMAA0/+LWXf89tqFsvAdY6S8Ww/cqQ25pgTC CPRtIyE/DZ7v7HqMYCW0xNV2Dcu5RfHJ3g6A7zbHyVDT9pnITZspXxgP3s+KwsMHCNuK Tgxy+uzDOKaMSKI2FxbhksRuP/93JNZ9e5Q/Xs/DWwRVATUl8IORwlRCuMgWhnDqp6F3 84vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F+Utj5s0; 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 q185si9256482iof.55.2021.07.09.19.39.53; Fri, 09 Jul 2021 19:40:05 -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=F+Utj5s0; 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 S234905AbhGJClg (ORCPT + 99 others); Fri, 9 Jul 2021 22:41:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:56678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233970AbhGJChn (ORCPT ); Fri, 9 Jul 2021 22:37:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 091FA613D9; Sat, 10 Jul 2021 02:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625884498; bh=8Q3uEpjy477WheXpk2ubs8evkJ+OhUEsTaZIHEwoyiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+Utj5s0lNCCjm2A1pAS7F/t/QF5KitvomspzfVJR/EzZz99Mki/TRujIVReGyOPA ngQIhZOnBYja3tsWBxuqHJn6nnnyvWcduAjsjQrjcByonislRO/rOFcJjuZwkr2wcu dVqep9ja/h287xvwqOYcQRzwq0ObwOqnIWc4UcVOzkuc0CYCWRST+IFhh9jiU+ty4X exA46QeDXLgwWFLmF4eCSgns3Antda07qslRZsJElwf1fQSe/dKnhzizUf+zHmmrzh OGUF4eJAAFJHJLRpTbpyauif21bvtNpy94upDZJtnwc8XlvSXrj67l8buMJYR4Su+5 rzSo0YTM/mpcA== 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 4.19 27/39] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Fri, 9 Jul 2021 22:31:52 -0400 Message-Id: <20210710023204.3171428-27-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710023204.3171428-1-sashal@kernel.org> References: <20210710023204.3171428-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 595fe20bbc6d..8531b490f6f6 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3510,7 +3510,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