From patchwork Mon Jul 19 14:52:24 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: 479918 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4234444jao; Mon, 19 Jul 2021 08:31:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP/8FLevQaekNDX/vjPrr6cuhsx68TgwH46Hl5tMGGK8Q6PcxWY/cf9Jjx5pLnWPYCkxxi X-Received: by 2002:a05:6638:3292:: with SMTP id f18mr22793140jav.120.1626708716065; Mon, 19 Jul 2021 08:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626708716; cv=none; d=google.com; s=arc-20160816; b=TaByGp9SjNYXbH6NEPk6kBBxL0hk7Skl+EXtS3Lpdwz36oBq4Fp1s/k2lYjbg/KrMM 8RR3h1Q7zSwV1kn6OpgWUPOD6pILkhn3ag2m5h0Ft9aYu9z04e4hQnAan/wXM8/YdF+9 fcIahRXnO6ZEg7dsBb/iUpptb3lcBrjGycVWSCHx6+92p3EHkOOUOgOocerHpwyV4XGN dvcnQcZeopoBkuYKC+rfbqdenUtcdFBi14ZTU/aKlqDb3JESem4JInt46rwgkMpzQSnG PsnR9YXK2eAoiyOT+M9Ik6NLiKsJPakUMe9y+eqPDhTN1V1C/0KLTC7r/Uf58RnOtCvw MNxA== 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=aAQT5nvaz834cFvyrrbhxP9S1TfreuEhC059ydiIzdw=; b=Z06qYvGjPxHotXZwfgZO0+SZ3GH0uWFy8ovcXojUgMPvY4bdrHdUWPEM0tSIXUnxO8 mSqjBdF4QsuDOfHxN2CLD8eQ0XUlcI1GkgfB2rpwNpmN5mAs67EcKX84vmOe7pfEmZ3E +DQOdjzkCc685ol9T3MJgyK+mxjJ9fxqxdn7gXNHyoWQHhHyn8ymbOxO8mP4nujUqMYx Hkn72MD0JQqY1m8vIGRukC5fcafsSG991MOVH2Gzn5A98Djd7FXQ0tplPBV4nT8i7eKr 6iByJlS0gXofYF/dJ6n8dkgGatLh+eCHZDsqg6fOxn8dVImk7k1hlHpcabyX+XEGfbO+ T7lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tQ70Xui0; 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 g5si10245056ilk.74.2021.07.19.08.31.55; Mon, 19 Jul 2021 08:31:56 -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=tQ70Xui0; 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 S239037AbhGSOu3 (ORCPT + 12 others); Mon, 19 Jul 2021 10:50:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:41932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344052AbhGSOsj (ORCPT ); Mon, 19 Jul 2021 10:48:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1CD99613E3; Mon, 19 Jul 2021 15:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626708364; bh=mg/dBNjmOrN16CbWPwjsPBTSuVAxaYt3Ce/hTeTt/RE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tQ70Xui088/pA0J9Odynhw3Ux1gXz75C13gAPq7JtQ4kve1jXG8dRnlzidA2PIYpA MpAFrAvX0WoAoSfr5g+YKmjL2G3NqSdjPO0uQ5SdejzXV5+vSJPTIDtXCfOs2FIutR fNoWG/iZkAMK/l+moYteCHBbOx9qryT/xQdbVtYo= 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.14 255/315] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:52:24 +0200 Message-Id: <20210719144951.812741885@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.861561397@linuxfoundation.org> References: <20210719144942.861561397@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 42c2a3065b77..2a172de37466 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4046,7 +4046,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++) {