From patchwork Mon Jul 19 14:52:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 479883 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4220532jao; Mon, 19 Jul 2021 08:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy48eXLp+3gGe5bolUi6SiH5YWm/Lj7MFgat/DG/lo1sAh20qg9j+P8PCHH+IjhEJOfUf9C X-Received: by 2002:a17:906:a38c:: with SMTP id k12mr28156293ejz.474.1626707617143; Mon, 19 Jul 2021 08:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626707617; cv=none; d=google.com; s=arc-20160816; b=wFE/5nji1aQvWOTTfXV4tiYxj+rskrh+qMGpw2719p4TUmYxFVpA9oZ50Qv6DBHbTP wKGMQHW4vDa8glDBWrLF9TrbDzAAeJDwq4w1ihrWw6VvfC0WfNVEMfHB2hDsiCXrMBHS ZqJA/G1eW6n1wrboYDlYGvFA10Ldzgf1vtm9u+ZwcMCTgKO9/K7wc40GBx+wHv8ZAwEx YIRklkiug3DMavGvJIPDmiHEkbYBvWlH1Px1U4b8dbQGbXfX/YKn3B0Xljbec6gLWaFc /yPfnV+P9EmaSTDttlim7jfGPbAZPkilnOvLxRaYsyBwvjxmvxyd0enMQ4t3URzdk03Q 36Vw== 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=Gg7wZp8KDOJvHbC2YW22VlAiGYqIOlVhGKMcUZSBi6o=; b=JM9Jefkr1RxMvGLZN8WZ9gLfxWnpp7cSPfe72OueeoBYf8zTLyWJY8ZfHkJpxY0Jd1 z9wNlpzYQt7M091isr7Dr//SwvXg0BXYQkJVWLhoSb2uinCP/Bn+Ez0pDCZSPXpcT+fN tdQXTCa+c2b73NBOJMxepdCvYlVw9dR7/DJ6hfcwCwFlqrR2Coe/cPBU1FjCiTuwd/GK AkHrQXF4FrcoTy/Y4Q6gSbjiU4iZI4dCDW6GPRqJlvlMEMStnkm7i0HdDOTctX+HeKI6 9jCKRM6FGk99hw6xLfWqGu5357yKlMis+Zew0d6XX91q4PR2ctFuLYFvLzdj1CpBCM71 +aiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1aE4II9N; 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 d26si20449114ejc.620.2021.07.19.08.13.36; Mon, 19 Jul 2021 08:13:37 -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=1aE4II9N; 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 S244025AbhGSOcr (ORCPT + 12 others); Mon, 19 Jul 2021 10:32:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:47840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245230AbhGSObZ (ORCPT ); Mon, 19 Jul 2021 10:31:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 864B061002; Mon, 19 Jul 2021 15:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626707525; bh=0qHn9VaHBqd6Gx7tq3pjOXAu9w80RSUBs+m5shv83k4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1aE4II9Ng/WZw6cIL48Rn4V+EifJ+61C2cqOXaGDhHogrfRd/PXpJets47np5WxTg xvYKjZPNVfJBEc9TqBukbIxnLjMJrizhLiMEf5dVgC23OkF0te2N6XkzusGVzzHyOL a5VLTSYg3W8hn+PTtrJuQNmUjSXcbGfCwgskvDNM= 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 4.9 199/245] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:52:21 +0200 Message-Id: <20210719144946.838471953@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.288257948@linuxfoundation.org> References: <20210719144940.288257948@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 168559b5e9f3..0344d4423167 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3644,7 +3644,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++) {