Message ID | 20200826163340.3249608-2-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 80F2F722 for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 26 Aug 2020 16:35:43 +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 12610206FA for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 26 Aug 2020 16:35:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Mk5mpkEp"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="m3M7kpFc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12610206FA 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 88E09177A; Wed, 26 Aug 2020 18:34:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 88E09177A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1598459741; bh=94vf/goBzfoC5nm9rDlXYfi2mPg0KiLVJ1zsM82yLYE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Mk5mpkEpRIM9Nm+cROvv1DnHwpuxoZ6nkIWQqprXxMIpisaStaCXGI4fDekaRGCqB 6zmohSW+1q9M5sFuVLTPJ6kPY/b6oErDnojyCh1RhEprawghqsNI0JEjamLWG5iiBn XP/bIGxHrlTGXIm3eBsCXPqmAF0D9GfLZJK5iFg4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A648CF80299; Wed, 26 Aug 2020 18:34:04 +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 5A1A9F80105; Wed, 26 Aug 2020 18:34:01 +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 94937F8016F for <alsa-devel@alsa-project.org>; Wed, 26 Aug 2020 18:33:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 94937F8016F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="m3M7kpFc" 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 0CCB8208E4; Wed, 26 Aug 2020 16:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598459632; bh=94vf/goBzfoC5nm9rDlXYfi2mPg0KiLVJ1zsM82yLYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m3M7kpFcW9rvXK7isAcnGvGZ/dhMidJUXYrPYnBcaFk8piZn/jdgyMM35TM2ByHyw KvTezzZdeZYbSno4ee+7fF5xE0SSRyNziVZwKfrBcLdUVWPdlbAkBnW8+79fZ4QtqF bhF0ConO4FxAw3+20EVyxNR3y468Ohk4Idzx+zbY= From: Vinod Koul <vkoul@kernel.org> To: Mark Brown <broonie@kernel.org> Subject: [PATCH v2 1/5] ASoC: max98373: Fix return check for devm_regmap_init_sdw() Date: Wed, 26 Aug 2020 22:03:36 +0530 Message-Id: <20200826163340.3249608-2-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: alsa-devel@alsa-project.org, Ryan Lee <ryans.lee@maximintegrated.com>, Kai Vehmanen <kai.vehmanen@linux.intel.com>, Takashi Iwai <tiwai@suse.de>, linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Vinod Koul <vkoul@kernel.org>, Naveen Manohar <naveen.m@intel.com>, Rander Wang <rander.wang@linux.intel.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/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 5fe724728e84..e4675cfff7b2 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -838,8 +838,8 @@ static int max98373_sdw_probe(struct sdw_slave *slave, /* Regmap Initialization */ regmap = devm_regmap_init_sdw(slave, &max98373_sdw_regmap); - if (!regmap) - return -EINVAL; + if (IS_ERR(regmap)) + return PTR_ERR(regmap); return max98373_init(slave, regmap); }
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: 56a5b7910e96 ("ASoC: codecs: max98373: add SoundWire support") Signed-off-by: Vinod Koul <vkoul@kernel.org> --- sound/soc/codecs/max98373-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)