Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3345075pxv; Sun, 4 Jul 2021 16:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2ckTtD7hF0ijegvyeqRpsk2cgM1qKooA2pd2PZYuzIs8kdhmAbofQGbX0MZsMp9QyC4WT X-Received: by 2002:a92:d9cf:: with SMTP id n15mr8314057ilq.112.1625440106187; Sun, 04 Jul 2021 16:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440106; cv=none; d=google.com; s=arc-20160816; b=hDXmLTk+cLXN/26bBDCkAcakwzJR18sKyfaSPbiEO6Rh8WqINiLo6T10wj8iYFZ3JY Vo0cqO7pwY9cHLnWmllgBvR6/x0s7T5kIcPW7dymuX+pcS2U1HjFIFI6N7bteyNgOBqf pKaWChDSNVb7YbxM0DFqi3Hkd8e8ng9DyJqCyoD6rL5VNddpeHk/NImur0yRknteq1n9 iCFfPliPDem9TAtC7PXu22O20WUFL7xWs2WzlZXKix5z2H/szME9pN+u7CGRp91hJYaE AftpDOUm4uMAQbEjvvdLpcYtqoM3+4s1gzqGUW4do5YKaDjOOwBFoIrFyQuwe8IT9CPi 3W/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1/nhpFXzI8HRAtSsZuUrxDwUNdNJ7XjfHaDrUqD6nNs=; b=Yuei4CLT9qWhVvbJoWIJ7GuDFiDFsR5F0B6BjveSf2kJZ9CZqgm4I1wa3tQ+x9KI8q INAgTF99zZAFG2YQoFPWhhkv/0zt0iwmsaKzY5UmUzO4D/xGZPYcxLRu8GqiQneTkMYY yfKqx+T4ydNXHp/OAbV6unAZOyFjN4n22EJBWKEptVrvxmIeeipl7gfach/e4eZ8e5SF L4AGG+00h20MNKyCOZXxKmucbj53StEuMbGuvuRDqzmw2EqjmZrcZQs6ZWGee1wwB+mV w4F9Qn9ImECf79BnFNoKtT/15QSW/pWNwsSJG+fET3nZZU3YOGng/9ccjzKDLvFnLdIq RKXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cr0y8w//"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si3148729jaj.28.2021.07.04.16.08.14; Sun, 04 Jul 2021 16:08:26 -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=k20201202 header.b="cr0y8w//"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230098AbhGDXIs (ORCPT + 99 others); Sun, 4 Jul 2021 19:08:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:45944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbhGDXIP (ORCPT ); Sun, 4 Jul 2021 19:08:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 961356135D; Sun, 4 Jul 2021 23:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439939; bh=raElE/LTi6RdTWtu6Qz0VjOIA0GIV9i4FphLeAtxHu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cr0y8w//bhqQ9FOJCpWWyjzKnh4YQEp2mgP8EW/0Kc362G3RxfnrpLAB7VHqCpEUk TCuhmCjeod3NG83jcPMPrJkamEu2ZpauMCC1eX6BomGzrgpg0NuLf0kN+jpeq63HKP yS+wxbLi3ug93MjMIlXoThL75N7Ie+SeAW7QdO7aHEhxWBK1SeHp1XQIkZjya4etRa edGkFs0HiJz46UmlV/9TuWggRrKMy2tgv19GTP24xqYbqS8vogCXFDLgT7v3ruC9xx i66SV54cGLloI6prLi7Ymm5BpKawkBVXD/4/iD236lV3liWb6NIWO/nMitKoB8lSRo Utb9CHDjyjpyQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Axel Lin , Mark Brown , Sasha Levin , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH AUTOSEL 5.13 57/85] regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_ext Date: Sun, 4 Jul 2021 19:03:52 -0400 Message-Id: <20210704230420.1488358-57-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Axel Lin [ Upstream commit 70d654ea3de937d7754c107bb8eeb20e30262c89 ] devm_regmap_init_spmi_ext() returns ERR_PTR() on error. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210615132934.3453965-1-axel.lin@ingics.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/mt6315-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index 6b8be52c3772..7514702f78cf 100644 --- a/drivers/regulator/mt6315-regulator.c +++ b/drivers/regulator/mt6315-regulator.c @@ -223,8 +223,8 @@ static int mt6315_regulator_probe(struct spmi_device *pdev) int i; regmap = devm_regmap_init_spmi_ext(pdev, &mt6315_regmap_config); - if (!regmap) - return -ENODEV; + if (IS_ERR(regmap)) + return PTR_ERR(regmap); chip = devm_kzalloc(dev, sizeof(struct mt6315_chip), GFP_KERNEL); if (!chip) -- 2.30.2