From patchwork Mon Nov 6 11:37:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 118019 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2662914qgn; Mon, 6 Nov 2017 03:38:08 -0800 (PST) X-Google-Smtp-Source: ABhQp+Q4sY2457ON+O9wYMQQisXgR9hzRvSuayGxRnSYOOen+2qD48vo2Jx3SskUVV4bHKI25wNU X-Received: by 10.223.199.15 with SMTP id k15mr13242647wrg.111.1509968288712; Mon, 06 Nov 2017 03:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509968288; cv=none; d=google.com; s=arc-20160816; b=vF7V1cCaVGgB0zRefbvtc6xNEV2NcVxq/yJvhUPQBHDS5/dzJ7oeLe7Aa/N6R0Tzww NfLqi626FIwCCEtQ2yYtxfN2GoCwIMMaY3kPK5aAH9ScV2XeGDgh+Pk7WNbkwtRBgOqT Wrkff6x1FNGTyeLToJZwAVriy2+IiT2+pvMD//NxGk7hDUaExUuUhqsiM4o1MjQovL3f 5NKG//yCfrWz4YnX6ypjB8+vGDi3EMb4NMW5lZoBZkN98Yc3uHV7ZQ+wlBp0suJa1plP Ko1pGZuqKR8vm8b2J4t5oLvacV+M6jkTNOJGNb0fmBsIwWzcZKoZSy31zxP3lrt0yHZI uUZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=oaLwndjahQGtX6xJKmNYhY3C3ISl3x4tcWZXXvJl/Vs=; b=rdHnrR1c103fdjMAnWzJaRur50J/6hvdSrQYJx/jA9UeJvlORnfO/cbURSqxewfwnZ U3D8SxA09iVLiW1w/mJqUvKBgUEzvKWT0zY7SVgaY86wr9TpXFUrxLEZ5g/a60m6UwBR JGMT1fkvVDSMJlcmKe7G2X5erI0b28zfFfG9v/xHq1offbVZgAjeQrkKh3sqtYpnj8PZ TWhyVaYbFo+tAmZmLcWRTMXQJHBFvyd9iFbwbtt2OHqhZ4qM3NdibXqw6IqfP2qqPb/B JM2vWcC8pQsJ+zOOSiMQPsGAURf26JxdzfXkv8OxUjX64BmaF5bN/rZop+o7eXiCABub 0GDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Lm1zr6Cc; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id q190si6601335wmg.234.2017.11.06.03.38.07; Mon, 06 Nov 2017 03:38:08 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Lm1zr6Cc; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BAA802671DB; Mon, 6 Nov 2017 12:38:05 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4B5372671E0; Mon, 6 Nov 2017 12:38:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 09AA726713F for ; Mon, 6 Nov 2017 12:38:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=B5OKR62rvmJSWuzBgu5Fuam4AoajxHYC3UZrPtMk+yc=; b=Lm1zr6CcM4mo vJmi3hCLRPjtYu/YHRp90X5krq3poRW9ByJyBKbK8UuIGlBhlUV9tsByoToFG7T7Kq9FSBV4iXFGA PbPQ+XF6Ky19+HtjkjFZLMyjU6cTYPe4scMFZxthKKp6HNH7rWHjO7atQZuDGUTnWAi88wny4nCE7 GPRpo=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eBfj0-0007Mr-71; Mon, 06 Nov 2017 11:37:54 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eBfiz-00057D-Jo; Mon, 06 Nov 2017 11:37:53 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <877ev45ik4.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 06 Nov 2017 11:37:53 +0000 Cc: Simon , alsa-devel@alsa-project.org, Mark Brown , Dan Carpenter Subject: [alsa-devel] Applied "ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From c409c2a963475f0288ba3bb47a10f04f6441ffb9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 6 Nov 2017 01:07:27 +0000 Subject: [PATCH] ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed PTR_ERR(NULL) is success. Normally when a function returns both NULL and error pointers, it means that NULL is not a error. But, rsnd_dmaen_request_channel() returns NULL if requested resource was failed. Let's return -EIO if rsnd_dmaen_request_channel() was failed on rsnd_dmaen_nolock_start(). This patch fixes commit edce5c496c6a ("ASoC: rsnd: Request/Release DMA channel eachtime") Reported-by: Dan Carpenter Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 5bc9ec16813c..fd557abfe390 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -219,11 +219,9 @@ static int rsnd_dmaen_nolock_start(struct rsnd_mod *mod, dma->mod_from, dma->mod_to); if (IS_ERR_OR_NULL(dmaen->chan)) { - int ret = PTR_ERR(dmaen->chan); - dmaen->chan = NULL; dev_err(dev, "can't get dma channel\n"); - return ret; + return -EIO; } return 0;