From patchwork Mon Jul 19 14:50:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480001 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4270802jao; Mon, 19 Jul 2021 09:11:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWi6kLTRHiLOs4fkCzlds8BWA4P4XhoCOM6dhBJd85Vh/FRho0EoN/hoovr9CEHjmm9pdq X-Received: by 2002:a5d:4392:: with SMTP id i18mr30331411wrq.231.1626711085472; Mon, 19 Jul 2021 09:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626711085; cv=none; d=google.com; s=arc-20160816; b=XH8LEp8g3KqwtknoP7GitFzlXRGhlOa9uKda6DXMFhXQv4Lf5Bq0JuMiAlZj5FtkBu YT+xyi3uIozv0a9hJS8xUx0r2acDRpayndLaWs/zxIamVkwCkOozgOLCNMgrX31NCHHu oFmTaCGMIqJX0l/NlxwvVIQGd4Q+l1awQpg5lr3NKQKHxGTOzESRrm3REZmblTPydKBX YFUzgY/HR3P4wqL/k3OUbV6AiMaHJFIM54CoQLkSIip6EoMKUN2CZR2HlI7Dcj47pDYD 78Aw70hfYIQvAKPFrQz/x1yLuhxc7VkCcBc/7jlkxw29HL9YZ2w42VVMakL3Egp73b2R vQjA== 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=BwXPNupCMGgQpEfH2CEAOfEJI1uaJH5mFL4aPkf4mZ4=; b=KS5PnR6FFZtCx25nrZV1aAC3MSlTsM7cbPxA/HIo8nbaV6Xr7Dc3SpbYwVNBMi4yVO WnPZBk6yVfJnuDjGoFesBH7noxriVFDBH6ppnpZ7IkRZOI07dRCQTDUZCtpYhWFNzRuK OtqZfLaEg8Kyk+fG90hWMuaEP++LTzVIVGLoOBnfgLRlFK8wQ+5NvYc56vIncSTxgL5G u2EjC/jQpVvgusVy3ybCQu8O6au5Z8vCDtx1xvEW9tQN/tlvWOCnHcLnTAh762kSFOJD Fh7IWcVCV3ClFKXUlUjh10Xseeuh/QVLBqnqWQA1JiKn4M+BJOvFOiVkNoa49RzgwGZ5 xgog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fvaghnsj; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 la14si22045543ejc.142.2021.07.19.09.11.25; Mon, 19 Jul 2021 09:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=fvaghnsj; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S242655AbhGSP2h (ORCPT + 12 others); Mon, 19 Jul 2021 11:28:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:43556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346593AbhGSP0F (ORCPT ); Mon, 19 Jul 2021 11:26:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B7C6461002; Mon, 19 Jul 2021 16:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710801; bh=pAlfz564xk2BTIyFgBpAxGng8eKBs92lkfvotMxPEZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fvaghnsj1htbilHARter+DwKupGjP4F4aG+7kToSOHi1h84W5M1H+P1p6Eo+DfPfJ S+Oudq3C2ZJdNvTzaYx10ptdV/m6B5VpoV+KHa1IF5yW1+hmocL+IogiycaPQ9qowp hC4NzJU7QdAT6/bnDoI4peSlN4NL5D+gf9bzgotU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhen Lei , Mark Brown , Sasha Levin Subject: [PATCH 5.13 113/351] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:50:59 +0200 Message-Id: <20210719144948.221375695@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144944.537151528@linuxfoundation.org> References: <20210719144944.537151528@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a76974ccfce1..af0129cf90a2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2793,7 +2793,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++) {