From patchwork Mon Jul 19 14:52:36 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: 479974 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4252548jao; Mon, 19 Jul 2021 08:51:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXu2Vk/vltsTpe21XFS9ZHb8ibSGb6qSBxaqRf3wsykQnGjsvAIzM3cg34+By686/QcgBi X-Received: by 2002:a17:906:7302:: with SMTP id di2mr27644381ejc.409.1626709860534; Mon, 19 Jul 2021 08:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626709860; cv=none; d=google.com; s=arc-20160816; b=Nv7oEXSG6/pQQ4ADBatAVdKWLZj1iSEYkr9OVkxLxKdWJ/zxKlHKosbIMaqyZvBpvy G40o4p1NmZMyIPrGp/8XvAHfcL1co9bznPIyY5U8jngYnQGohfEowfQyznucHbxYwdCE uCxXMcUWsTE4I24+rk+LijaLcDi+phI4AnrACGQvk7Fh1CrbUA8aVZlnNNFlzsE7GkFy IrS2k27nH05O8EnOWRXEuCPREjRJ/QwGJfnMf4wZexOpmhe7uhx28sE2xqIbGtrYIks7 bGsZHnKEnSIEWR5ZahXEVcCtCVuJemlHbewhWBm+5dkKTPGaCoSZIWP8M1XkHKACeykP n1yQ== 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=c1wgM90P8zEazeXELg68HYF5zq5led5H5f4AzTFpQUo=; b=jNPGfslFGuWlCKCGPhieu62jCpRUZH8tvRCmdgRVW2jiFNhsiFpWlEWRzpwzX1110H JUWrnnCPoaYz4HRsoOSEaZQGVi65u8k9N33UxRHHzuYMYrrNbg+nZ7Z8JpBpJS3AhYUi 9R+Ev9Fx35MZ9m1Kipb1ydvmbMH0X2I+mcWEOv6Db5qgavcXeLWmUYH09dG6Jv+0fV5D 50gW4r3B6eCTX0YkCagZnrCTXnAkMLmT1UmL047HmacpzQAY1sPJzq/oIzavisNqC2pN tRUTMC0fYBCe31e4ZkIhPsVXELqO0qrAEWyb7ThUx0cGKUDj+PyCSXM2gs42CTnVJWrB C7dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wcAFxUdi; 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 x22si21782145edd.466.2021.07.19.08.51.00; Mon, 19 Jul 2021 08:51:00 -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=wcAFxUdi; 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 S1344769AbhGSPKH (ORCPT + 12 others); Mon, 19 Jul 2021 11:10:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:42190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344174AbhGSPHX (ORCPT ); Mon, 19 Jul 2021 11:07:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B74E611C1; Mon, 19 Jul 2021 15:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709663; bh=gQzsgDPXcbcYollQuPdz1JDbABIJHDdOb+hjNlPbhik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wcAFxUdiyUxS6G3oYgVOOE7a49cY6vc9T9mNxdWyNoEBJHSjENoP1FDbVzJwDFANv v6hg8+NCwPmr30WttrmhDxax1TucbGnk5y6NyzjyWcXYc3y+BCn7NOEVGP6oI4QPCt WIuSGTJtPUKit+isy7B2uJ+TY++SZ2uZCZ4y03nc= 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.4 048/149] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:52:36 +0200 Message-Id: <20210719144912.842967055@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@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 9df20768a8f2..c0e03cc8ea82 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3178,7 +3178,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++) {