Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1148099pxv; Fri, 9 Jul 2021 19:32:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdloWnes//q4NMz80H/l7QaKtahUc1VSFDJ87j9f1p33/vfj7PgVvZ68FOkbuRl/BVT23M X-Received: by 2002:a17:906:c148:: with SMTP id dp8mr39740241ejc.507.1625884376057; Fri, 09 Jul 2021 19:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884376; cv=none; d=google.com; s=arc-20160816; b=Qgw4DRoCLTzjdfmyn1J/ixnkJOXEkHPZv8Vf4IiPOM7jNgxBZfEh1Z/pIE/2APImtA WPgn/qhHVMCMGmq8mc/oyEBTlIQxYrXO/zPeIQ+dwrZzGIUWfP+wqUB/RnNChdqk4mk1 R2nASz/nP2Q2tmtkn7KYd0F0CJm/5PJ9pAqR4oT8dmNPgj8ymXUfAEzC+/hpBdbrTw9n FX55/K74sT6GvmLlTuF7QYQ/lNme5GhpRq9DlTFN0Bi4+1rtFo8LW+vjvZRUfm9cgd2c r/x7kdOK8PWIkVrkZkJRNdVjjm7ooT6mor7CoMvcT3bs+J4gIHBDEWUCK3I/m+RQvxRt m/rQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CHiWVhQRsJPFtqw8UlWTgM6H48zAcQZauHpJWQY41a4=; b=FCdta6F8yG83pZTyU4XoDxDdfkFvGOooJHT4u1LcVOjsH7B5NK61RYvVhCQt/3qu36 kOUhFCC8DzkpgI0qN1Wca3cxjNrBTvkdBGWq9b4rmXhbzNH5bJYCYmskmKAmiE0FjaNL oRtJ2pFY2P8bVHZeJycG28sVXElmsEftuayOPMUqLjxCghuOZ+MCePd5TBoZdabyzTzT /Hgj3Ju5fP0MZ4OoYaBa+lFaH3USDv1W9Scloo3MDO2hYBQoUqnatWxenTtR2F6z1lEV gOMJvEMkQkK9xfd0Vs17tKxnTUZN8XTn4kxB7cl1d64YwuvolDfSoc3UoIXNnwFrTBua WIrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZza1hxT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si9111492edd.302.2021.07.09.19.32.33; Fri, 09 Jul 2021 19:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=KZza1hxT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234505AbhGJCdd (ORCPT + 99 others); Fri, 9 Jul 2021 22:33:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:43180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234426AbhGJC31 (ORCPT ); Fri, 9 Jul 2021 22:29:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86C57613FC; Sat, 10 Jul 2021 02:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883990; bh=BAx2GDapydcayVPgmDKTjmO6TJRsJq0/Tnd8ZZI9me8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZza1hxT/M2aHwibrc6VBQ0I7Ts292cms7mgQQYFYNt4I0WIv42lf7wGib8oxNGwN +tp+1AlYcrUt7/A1zI8UtW2zbsGiMnnd44XHe3EP6GvlWqMHhU85X5VTdJjW17gstU 2RCZU5WvlDPXuScmfZbv3kz1A3hJkl6ZB8pntNcIZk5jOq3GTBrdMwIyvY6+6nlhMC E1u2WCJtR63DwzH/7O+3UH3mCtECGj8dsB1vYSU09l3O1Ph0XsTF+y8VLg36oI487B P/8VRMQ3EUfx0Km5ABiy5MeXYEKClvE4yOCbKvBjx4QTua0QNaJhjGsivfldTZd1jN WVD3xD2e4vYtw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhen Lei , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.10 66/93] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Fri, 9 Jul 2021 22:24:00 -0400 Message-Id: <20210710022428.3169839-66-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b22674e3a89c..e677422c1058 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2804,7 +2804,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++) { -- 2.30.2