Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3296737pxk; Mon, 21 Sep 2020 09:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp5JRFLSb4PcuUKM5oUumdMYng1FWiqZDv5A04gA1UbPjOSBBZFTG7ho3j5S1j6IoMA//e X-Received: by 2002:a17:906:3506:: with SMTP id r6mr382051eja.55.1600707524228; Mon, 21 Sep 2020 09:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707524; cv=none; d=google.com; s=arc-20160816; b=P1zihe1VDcCscC+kjbZ+Fz+LeJPKeuEdCOQJ2lSTsEzs8pNNzBwUMZKPFyQO6yQtfX WhMykL8mG/i0gKEjdCKmhi0yzEf60GLdtfKML7mOXtP5e/YHUHwiCr3T9oL7FxyxEiku g+tfZ2haR1tQmYB6ww56U0i3scEUH5YqkjQpWbzYl7mrM8iimNXD1AtJSekwFFcEs8B7 OcIyQ45YbfoKSG421jfka9Hm4k158o2rsd6GtmL4RR4cvt6pw/4NAqAQcGfRsK4S6MDo SaVPN6LFT89A+RbrDjkOaW38kH5M1272QyYYFVjN6elgs3+rSaUV8DdnFZfWfwr2t6b3 k13w== 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=WV90NY4MzHlO7rDD9NU/xI5QuFO4OHM5PjgT7lf8FBY=; b=AcIGqL7s0c/pY+/YLpN+e6x3F1YEBAzcT2MfQmp/Zuzybs0sV1XNmKOi7gx79HIacB Y/CGDsMmRmlOFjHkoUjuxukWov1vwoNy4agwcdb3h9PS8khL8G0VL/Sz2t6Z1+gC4uTJ EC9ikksMgtJu7W4Wx2jj6KmWP/KLltU2jpHnyFwQFTu7i/4ZEsljoqMAbXi33jiUB2Ox +pCis/k0wbCg/X3zTQGR5K4yHVA5zBvFXVlNC50Bw/anE4BRA6CpF9NJam4zn3PGUNLA 1FrZTrqDDCWL8dvH5G7jPSPIyb/A6CoKVWf4joZY/5Z1fR74G+qqQkGJZN2iR8XX9MRe pQPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A2aKAEET; 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 c8si8620888ejp.43.2020.09.21.09.58.20; Mon, 21 Sep 2020 09:58:44 -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=A2aKAEET; 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 S1728396AbgIUQ5E (ORCPT + 99 others); Mon, 21 Sep 2020 12:57:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729680AbgIUQob (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 D13CB239D1; Mon, 21 Sep 2020 16:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706660; bh=rMOux9ljbOvRkI7qknP2I0f6IMPCw0NEbsP9Zw5BZKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2aKAEETUDfyc7NXRfZkQUgPDijtPo9Y7FrkFgsStEGv/z4nOy76auxCgcxnwwXF7 MDUCRQTN4Mw9AwhfZFvqpg8w+AjRC+AfxFipK/1b4hbVvkUbgiCULmGw56Jfg/znmI Y/ljAD7PKB7nKrl4lqffxnNdEpsmK4gFOGhvP+6w= 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 042/118] ASoC: rt715: Fix return check for devm_regmap_init_sdw() Date: Mon, 21 Sep 2020 18:27:34 +0200 Message-Id: <20200921162038.266943077@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 282eb0b52e3f0399ee48a4cad0d9ffec840b0164 ] 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: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-5-vkoul@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt715-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index d11b23d6b240a..68a36739f1b0d 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -527,8 +527,8 @@ static int rt715_sdw_probe(struct sdw_slave *slave, /* Regmap Initialization */ sdw_regmap = devm_regmap_init_sdw(slave, &rt715_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, &rt715_regmap); -- 2.25.1