Message ID | 20200826163340.3249608-3-vkoul@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=TbbB=CE=alsa-project.org=alsa-devel-bounces@kernel.org> 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 9AE2E722 for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 26 Aug 2020 16:36:34 +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 26DE62071E for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 26 Aug 2020 16:36:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FVzSWlqy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="UYaU41dK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26DE62071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 04A75178B; Wed, 26 Aug 2020 18:35:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 04A75178B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1598459792; bh=5begK13A57C1a458MwTLaxrZjgC2tYsW7SVnYewFwTA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FVzSWlqyD+8goArASn2u2mWFMFc191GTGUudpBFD1rLx0X1sPusraNQ6MksDkXMlE hi2OsTV3Az+rlBCIAqH3UzEPEWvK+Q2AqAr3WBIys9AZRVymiRvEmVgBe3rMNgF2PB vBCq5b8wzT6aiRAIZ2VLY4Zi91BIXKNSXyq0BI5M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AE31BF802DD; Wed, 26 Aug 2020 18:34:09 +0200 (CEST) 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 30E2BF802C2; Wed, 26 Aug 2020 18:34:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 557D5F801D9 for <alsa-devel@alsa-project.org>; Wed, 26 Aug 2020 18:33:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 557D5F801D9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="UYaU41dK" Received: from localhost.localdomain (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F18F12083B; Wed, 26 Aug 2020 16:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598459635; bh=5begK13A57C1a458MwTLaxrZjgC2tYsW7SVnYewFwTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UYaU41dKqb3+xdt/QB5khsH4+oUOJF73nS0Njn18r6JLblV9KFDTaGDM/RklQdRKa AOKDgt2qGySpjbaWUo+Lm1ZJdCxq2dZiw0i9Asf90MRsNkTOgzLiNS/+DfZ5PmQ+KE 7kxXm3wM2lZcl8NJDq6NNild6F8dRHDFBsLYtYpQ= From: Vinod Koul <vkoul@kernel.org> To: Mark Brown <broonie@kernel.org> Subject: [PATCH v2 2/5] ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() Date: Wed, 26 Aug 2020 22:03:37 +0530 Message-Id: <20200826163340.3249608-3-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200826163340.3249608-1-vkoul@kernel.org> References: <20200826163340.3249608-1-vkoul@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Oder Chiou <oder_chiou@realtek.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>, Vinod Koul <vkoul@kernel.org>, Shuming Fan <shumingf@realtek.com> 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" <alsa-devel.alsa-project.org> List-Unsubscribe: <https://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <https://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" <alsa-devel-bounces@alsa-project.org> |
Series |
ASoC: Fix return check for devm_regmap_init_sdw()
|
expand
|
diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index b0ba0d2acbdd..56e952a904a3 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -684,8 +684,8 @@ static int rt1308_sdw_probe(struct sdw_slave *slave, /* Regmap Initialization */ regmap = devm_regmap_init_sdw(slave, &rt1308_sdw_regmap); - if (!regmap) - return -EINVAL; + if (IS_ERR(regmap)) + return PTR_ERR(regmap); rt1308_sdw_init(&slave->dev, regmap, slave);
devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai <tiwai@suse.de> Fixes: a87a6653a28c ("ASoC: rt1308-sdw: add rt1308 SdW amplifier driver") Signed-off-by: Vinod Koul <vkoul@kernel.org> --- sound/soc/codecs/rt1308-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)