Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3296703pxk; Mon, 21 Sep 2020 09:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4tjPdNZuPof/pt4AFQy7ugHIKlOuxXAkUXgT/p2JbTUkOFZgR0oG57ysiWPmY0FhMFw7Z X-Received: by 2002:a17:906:8258:: with SMTP id f24mr325719ejx.551.1600707520868; Mon, 21 Sep 2020 09:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707520; cv=none; d=google.com; s=arc-20160816; b=RtUOY8ZXM+mOidPQV8MPmJW437N8cHXhpL77f6mphN+wLZ6/HXZeSCUPIPgVqWZplm fG4C/iPusN+0+Yv2co5yWRlEjEJw83gjV8GaFVZsn2Cf8Iujqi4uHVjyq8ovN9WhCAGS vmKMWCoN9tmPjoEyNLu6wiqal6DhEfiGmkUI0Wjtqa21UHME7C6mis6oV2ckQ/kV6c3v UNPyTK3Fudmuy6ixKm7NT5HEAICKdwZ/UXOVzoSHqBjaGj2UXt0PgcuL/NZQ2M6CyFZy oCBFyexL5U7DNmno2DtGxAhOJ6WlH6MQ9qHuefmwhV7N0JGkHPKgGhFBQFLZcv3Au441 BYBw== 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=N6BkeEmGNTGmMpIYbITxM77sxIXuP2xcDr4MDnN2Pg4=; b=ZgO21IbDEdwOCjo5jxPInLdNWwZv+BW1xcdwX4tcDbi8I3AS9TfFjCIKA/ozSdzU+w PLEXTjojKH3e1SuPJxP/tfZGkB1NzsQD4WC4tcyIh0g7K/6FNm5tjwZYZ+0vC6XTOa8g YKLwlzEpQ3qaPz3PqDxvLeqFEhkq7Kh7yrwltMLlyA+b+dP4U7oihpb4iD9L2evbqPx3 0TrTELrAz4tjRmEIWdFhtZMlBnxOVlqh+KWQPBOJTW3G5udRqEoYLKtEhH0RSpKS7ZFu TiPHXDnPGJ3yJMCwRoWlnjIoNDywnyC6Gd2hckwbIx4M8EAq+dZ2Um8tM7dsD0dMTeTa oxcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=habN3al+; 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 d17si8357930edx.591.2020.09.21.09.58.17; Mon, 21 Sep 2020 09:58:40 -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=habN3al+; 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 S1730205AbgIUQ5M (ORCPT + 99 others); Mon, 21 Sep 2020 12:57:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:49876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729249AbgIUQob (ORCPT ); Mon, 21 Sep 2020 12:44:31 -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 1C9C1239ED; Mon, 21 Sep 2020 16:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706662; bh=5X/DYBT5/gSjOuqlaOrhJ+FYCXkn6QRmAdRhqOafT9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=habN3al+QnmIHkznoHjMvdQRotIFaxbJgoBN9PZOYj0fCflmUFNX/TCce3pGorCdC oqaYa5BGU4Dtkh2ccvP+xkVoqGjP90zi6VpWtZPf0P2JM7T7ZVb8zhgqctqPS87IGb Xdz80+8ANmvRBTvDTTkRv47pRtzLtFoZ/1+iCz0I= 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 043/118] ASoC: rt700: Fix return check for devm_regmap_init_sdw() Date: Mon, 21 Sep 2020 18:27:35 +0200 Message-Id: <20200921162038.317894283@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 db1a4250aef53775ec0094b81454213319cc8c74 ] 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: 7d2a5f9ae41e ("ASoC: rt700: add rt700 codec driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-6-vkoul@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt700-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 4d14048d11976..1d24bf0407182 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -452,8 +452,8 @@ static int rt700_sdw_probe(struct sdw_slave *slave, /* Regmap Initialization */ sdw_regmap = devm_regmap_init_sdw(slave, &rt700_sdw_regmap); - if (!sdw_regmap) - return -EINVAL; + if (IS_ERR(sdw_regmap)) + return PTR_ERR(sdw_regmap); regmap = devm_regmap_init(&slave->dev, NULL, &slave->dev, &rt700_regmap); -- 2.25.1