From patchwork Mon Jul 19 14:51:53 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: 479989 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4258929jao; Mon, 19 Jul 2021 08:59:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcAdTXlFDWV/w+3tq6rcZjsji1Q4FO8FSjNLdVOcFvwpBO6jFXsCGxhop0OMDihdhL3fRr X-Received: by 2002:aa7:d554:: with SMTP id u20mr35129514edr.50.1626710347995; Mon, 19 Jul 2021 08:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626710347; cv=none; d=google.com; s=arc-20160816; b=vLmEG3gJJxQMflBK4c+3e8h/Cqfa0P6hWLGSs9ApX/bh7ZZIy9Njqk8dxeDD5QQbc9 poUVj4YIsd+314K6CM9ruHXwN2k7XQT5sVacGs7EwIsOwEO266IMdOP2k4LPrDSPwwWk qsEfQxC5SUGIPckB0uAaswPAf7AhCkciCmW6XDVR/dSUVoVfl98+szM0Ser0WyU3v4QL hwcYekIqkki6BBtE60hQkzYFmq9wR8xeI+4/4icEgSEiiyr2U7on8VhWXUAxyJJz/EID OFGQDZQrmRr+0cHRVQu6Cq3N5RkQjj3ufNLgx/It4ZQyrmjvIzC072Pso84pScivu+AQ M82A== 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=CHiWVhQRsJPFtqw8UlWTgM6H48zAcQZauHpJWQY41a4=; b=1I2X/hGrndH25ayYUU9Dl6x5r89KBFNi2qu/nJgi8G7s8DyzXJUoAxnH2V3hVtXKy5 HC5b1c5rkDP6HdF9mlG37oG/HopRVZ812OFGConqqlo0inY6abokpYPi4T8CMJZiuLrq YlEwavHWYkaLeBLhzRSkNberA5SBTHyqEAE6mkFDx/G1a+uWmrS9ENYDC9ONoXbWFti+ EyaROjQfdq7akcyKUGaxRgzgac7A/pcwjbWGzFbHU55jiZ3AE8AgC5C9yVslT3aluqDJ XNhqp9Tlznb6VVQRG6GNI8nsj91Cn01DjbcixKgUBi4QEUdhkbheM2jkoXrUAyyOGHJ/ Op/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r6mpM5CR; 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.08.59.07; Mon, 19 Jul 2021 08:59:07 -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=r6mpM5CR; 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 S1346859AbhGSPST (ORCPT + 12 others); Mon, 19 Jul 2021 11:18:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:48862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346552AbhGSPOv (ORCPT ); Mon, 19 Jul 2021 11:14:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F72D6120C; Mon, 19 Jul 2021 15:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710117; bh=BAx2GDapydcayVPgmDKTjmO6TJRsJq0/Tnd8ZZI9me8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r6mpM5CRWA7LkvGmPf5yvLrUQGoif2ziuq6s0ntpzHqaRg/6M5R6cwTDipNZjickr Nc93/CMILSbS9DmMjzPrZvVSuxqjp/Ge1JG2HMTVDj1lO5bXXruDVQf12xOcUqHAiQ vlIjjWz50UxWEnBA/NY+JcyoTefvODB/A1Uk6780= 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.10 084/243] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() Date: Mon, 19 Jul 2021 16:51:53 +0200 Message-Id: <20210719144943.610813410@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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 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++) {