Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3132269ybi; Thu, 18 Jul 2019 21:39:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAB2zRfO04deopt/CSzxy3r17xJHqaMDarSnG+LpWVonqEY0KFbOcs6l5q0Y7LTL0PQOh4 X-Received: by 2002:a17:90a:206a:: with SMTP id n97mr55485296pjc.10.1563511178861; Thu, 18 Jul 2019 21:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511178; cv=none; d=google.com; s=arc-20160816; b=rjtrYPtp7fsoOcv51wiCyDJU5r7LeicEq5rCPB0OzOoge6IL9eND+nGynIFuA2EToI 6IDWjrxNeDWG75xzQK+OGP9rnsnMKgBtyrWX2wAJ6vScbG8ACPmqtaQVBiyspZmcpceT Zz1RC4AEd0aPBtkOQS0imBZsV//VI624Y9xczE8qRyeep5q/tnPzyoT0ouHltRiuggak IaJ1fUGJeCY2C5HIZEAxYKLGlHeY8ltAU7smYaOUMBY35OLqQGzXGI5Y9ZoXyvCtuoBX NlHRCEtmrg4/L1GYk/JG6HqVuqhqPmjoq6kCzMjXKlI/HTUDQqTAT5Alj4yxawhT5auV 7Neg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=46U/q7PtoUa4oWPPRJW1+LEU7prHc5URY5feI5KCgq8=; b=FHCRppHI6pzaSFdV0oyewrMS4rI8Q4UwstZVlVuHCLBDryuFNn5IB9AGCwedIVe/F9 heMbadcfHplUNKuhCXNxlLqXY2Fxs74ahc5oelH4D6ydQGFr7DTdF8wxBGjO4M6LLSy4 xW+cD86kbJPJH675lgVh4NpOAKEnn69sZVs5s8hSjZFXQwiwm56x9Sxmt8j1MxUGh4PM kZ5axGuFpTb0MAYMUFjU9n13337BOcAss2pJ5wHAsagkciDgtrPFi9CeCA88GpVRBwjw P/mFaaNRl4x3tdnK+RlA9Xe195QFAJ8EYAgb0RmKagGkNBLLnRPsHXmzyM9Iyfk7FHqv +Y0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nXaCSzZR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id m12si937775pfa.81.2019.07.18.21.39.23; Thu, 18 Jul 2019 21:39:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nXaCSzZR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729657AbfGSEhR (ORCPT + 99 others); Fri, 19 Jul 2019 00:37:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:59996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbfGSEAH (ORCPT ); Fri, 19 Jul 2019 00:00:07 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45323218B8; Fri, 19 Jul 2019 04:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508806; bh=HPwqXK7LYeOfAs1dVNST7+TF5veS5ciMOJwxqjjjRRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nXaCSzZRJlCiAGmtSaBGOsuZvI69QzPjlwZMhMSoPrp2wX60hb0YaZIOQnefjGcWK QT0pjNtwQg6Mc11Nj5X4NfESDcPBvlbUhfoJRVt6mDea8vT+vg0PdXRtp8imQraCpv 8TQ8YW05MbxjIo/r3MtKI6JyuSuEUisoURhwpKME= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Axel Lin , Chen Feng , Lee Jones , Sasha Levin Subject: [PATCH AUTOSEL 5.2 101/171] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Date: Thu, 18 Jul 2019 23:55:32 -0400 Message-Id: <20190719035643.14300-101-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Axel Lin [ Upstream commit 7efd105c27fd2323789b41b64763a0e33ed79c08 ] Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/hi655x-pmic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c index f1c51ce309fa..7e3959aaa285 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -109,6 +109,8 @@ static int hi655x_pmic_probe(struct platform_device *pdev) pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base, &hi655x_regmap_config); + if (IS_ERR(pmic->regmap)) + return PTR_ERR(pmic->regmap); regmap_read(pmic->regmap, HI655X_BUS_ADDR(HI655X_VER_REG), &pmic->ver); if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) { -- 2.20.1