From patchwork Mon Jul 19 14:52:41 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: 480026 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4285221jao; Mon, 19 Jul 2021 09:28:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws36sta9n4MnzTRzHCnzKEWtf0Sn6EawPi//bPhDK/eIn/gI600i3XMdCchLI7vjRa06nF X-Received: by 2002:aa7:d84f:: with SMTP id f15mr29564963eds.216.1626712093616; Mon, 19 Jul 2021 09:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626712093; cv=none; d=google.com; s=arc-20160816; b=bBKhmaFhdFF5K5iN2NK1nYjR1xsVDabP8frap7cdeM6WuK2cVb8fVO3Yc/L8aocmBB G8UFVX0KJhj8DfpHaNIECJtzhWDGfm2wJPvTqi2EOPW8VCWMXSD7XAsZm7mCJvSJR5QJ XDOuXT8r6WL32JBNiAWOZ+6rYWEq1ttlmKo8yKc+hpioKv2iIOmJpc8Rs3jl0SgR8IBN yHRGJfqsiKtylTnDVtnU9eNWMMwPYxm+FYYf5ocN3baYlcqTYoT007aciKh+rnHfBde5 gQjADuB0FqElEYYfEZkXxHdFsgl2hahtQe1BRv6/cgGizMUcoFuCMXALejUvDJcF1yPe WLCw== 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=gHfqUDq2GJ9j5kucGaNpUEHlAqOHLtUQB2tJXp+ttl8=; b=go6PEWlk04zAUFH2hV0BqXLrfl61B3AzFb+bcrfcvkA42TMhFMlznvMStV5S+nS8Xb esTMH4JqEYfOdadKBt2HXu9UsdN/IChNiBFcqjEBS0r8++jxXt4nfFTPKIVJgnj6Cw95 bzMjCzlkH+VkuZbvOH2VzpP/kQ5ntdYkkQngcLtRS8f7j28YaBLhw3DWtaJ1OO0eg6Ux iBrpmDcCUpiTmeAya6z+B/qm1bEDRzNbzLNKasjfpkfzgJLXXUAy/Kd1HkgIm6GT+0hN xzYmQDEOI35D1QjCXZZpknMbXT/drHTNIUHscTi2b24uz4FjQ628mToDQLLE7iuuBT/8 6EMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y1kJikAS; 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.28.13; Mon, 19 Jul 2021 09:28:13 -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=Y1kJikAS; 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 S1349629AbhGSPqC (ORCPT + 12 others); Mon, 19 Jul 2021 11:46:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:36640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347537AbhGSPlk (ORCPT ); Mon, 19 Jul 2021 11:41:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F117B61375; Mon, 19 Jul 2021 16:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626711698; bh=7wFhkZ0IlNgtCAhPr5ZrgV3HSP2CLK9OONDhD4XycyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y1kJikASfMVQaPh0aVjVGocxquY7u9L+UvFx1ti96ZSUj1784IoQ+uuWCzqWoYsox WvIFZFmax7yAJoGUxAhrtH8iR6Pl2IVRIN/XO71zt6eeoACaoulGA+5crwH4cgyKAR GPW9ZioSBViAo+ayzZMOzrjaqkopDT5Mu1VFmS6s= 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.12 099/292] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:52:41 +0200 Message-Id: <20210719144945.750366195@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@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 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++) {