From patchwork Wed Jan 8 03:59:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 11322669 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F6D1138D for ; Wed, 8 Jan 2020 04:05:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70C9D208C4 for ; Wed, 8 Jan 2020 04:05:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="H9FhIv6c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70C9D208C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6644717C8; Wed, 8 Jan 2020 05:04:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6644717C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1578456316; bh=K0wTqcJPRHlgxApWvwMpcu7omeUmOigEhMF8RMKSz2o=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=H9FhIv6cYTmCfSZv05EBHObij81c2PIVE1hm/CHpWov5Qf86xRvBavK7aHYrRPA// 1Uoo9lQY+zwg7ctqnHI5Ke9MBtiT6EbAySTt+NHb0PpAcF3sEvUEJ+DigUZGqTE+a7 3BbmbEXFj4usIU483QwrZVtSccyy15pdK2uFh5bI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D879FF80149; Wed, 8 Jan 2020 05:04:25 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5B6AF80159; Wed, 8 Jan 2020 05:04:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS, SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3DC2DF8010B for ; Wed, 8 Jan 2020 05:04:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3DC2DF8010B Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id EF6DA3285E508FE6DC2B; Wed, 8 Jan 2020 12:04:08 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 8 Jan 2020 12:03:58 +0800 From: Wei Yongjun To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Ravulapati Vishnu vardhan rao" Date: Wed, 8 Jan 2020 03:59:54 +0000 Message-ID: <20200108035954.51317-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Cc: kernel-janitors@vger.kernel.org, alsa-devel@alsa-project.org, Wei Yongjun , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH -next] ASoC: amd: acp3x: Fix return value check in acp3x_dai_probe() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: c9fe7db6e884 ("ASoC: amd: Refactoring of DAI from DMA driver") Signed-off-by: Wei Yongjun --- sound/soc/amd/raven/acp3x-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c index d9b287b8396c..bf51cadf8682 100644 --- a/sound/soc/amd/raven/acp3x-i2s.c +++ b/sound/soc/amd/raven/acp3x-i2s.c @@ -321,8 +321,8 @@ static int acp3x_dai_probe(struct platform_device *pdev) } adata->acp3x_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); - if (IS_ERR(adata->acp3x_base)) - return PTR_ERR(adata->acp3x_base); + if (!adata->acp3x_base) + return -ENOMEM; adata->i2s_irq = res->start; dev_set_drvdata(&pdev->dev, adata);