Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3296412pxk; Mon, 21 Sep 2020 09:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2pnVpKoARg3jjaraMPsr3T7+iDb9p5m3gQ7GLw6Ta09IiBYyiMk9GJUwZPAEZ4iWnzjzq X-Received: by 2002:a05:6402:1451:: with SMTP id d17mr621641edx.48.1600707493192; Mon, 21 Sep 2020 09:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707493; cv=none; d=google.com; s=arc-20160816; b=YcWlXOZfsWQBGlErkMwVrf3REYt2UfUMnO8uCaJQKtN4q/DLV3i9xFt22915os1WpC J+25X0kNppNn7R/duRA5KsS0ovu6XcYK1n2IeonMD3Tc9L52cYHOFeYsoabozS2+uzHP H4yrxILAmRdr9iC/eiFADAxaw6uQYb+eiJJkTPzT/11s+xm8mHKtpEu/g9KfgX1CPYWV OWaexVYaB+3EBWuV8/Y+0i/C00+w61j3uMttPzKPaSrRic1XXJsh5hGY5KkYlEmG2PFk dQYRHenAdkxviyYLHE2lMU7u+xVHdu23mMH9p+fTE0zL5z6QivWTm3g0fZtR6ob+uu3h Kejg== 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=mWsBQT5eryEQMl62buwNbQlzLh95n4JkkxsYkWrzIE8=; b=Qlh2R+j57LzA4jMawx9F50ooBxQ2ybYXKGVvysXjeRANtgkKLrXXEX1tI8X4/qhQz5 oJPvoukg1XIDIgkzC9ZVEFd3uvY2xIu3TWnTh/Hp5IvSpaEhTfBuRtZe+/rSaszEYAtt RLTbLcbv2UiiGiKbcUG5fVcGWekfJhoWWk8Wb7Pi6cmWSc4GEhGzelXydKrOFy6+Y6ZJ IQrPiQmJoIYtwGpflRt/A2UMacJXRlFNsMNDW3fXzdA0C04pXbSsXrulzgaLdukASIL/ h6LbwDBeS1RA/HI+cdsmhqJ9in+lhJRE+1K9GeEMC/kTzHyng/99Vk9rzKuDdp0bjLTZ VgpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="BsyPIk1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (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 v1si6131963ejw.413.2020.09.21.09.57.48; Mon, 21 Sep 2020 09:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b="BsyPIk1/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730164AbgIUQ4s (ORCPT + 99 others); Mon, 21 Sep 2020 12:56:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729682AbgIUQoc (ORCPT ); Mon, 21 Sep 2020 12:44:32 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 01F6B239D0; Mon, 21 Sep 2020 16:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706653; bh=A+/EOSHJaXLjM6V0dnwVJ52JZI+Vj+l6h0uzHaaqO2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BsyPIk1/SFFvbu5QHPWn0mssuZuLGVfPQMbbFb21wSfDO1Q2V/SnSgjYe0Hhx+pqA djWnOEWaZrfp9yHZnoUkeATiwJcc45vtlTLCHFFrfuIuWg5J1ZE28ZDlAniGosdKGO 8xY2lP29ZcMbIulR7/lCi4WmAlTJ9FUEG7+RWOXo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Vinod Koul , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.8 040/118] ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() Date: Mon, 21 Sep 2020 18:27:32 +0200 Message-Id: <20200921162038.166669705@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinod Koul [ Upstream commit 344850d93c098e1b17e6f89d5e436893e9762ef3 ] 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 Fixes: a87a6653a28c ("ASoC: rt1308-sdw: add rt1308 SdW amplifier driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-3-vkoul@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt1308-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index b0ba0d2acbdd6..56e952a904a39 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); -- 2.25.1