Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3788365ybi; Mon, 29 Jul 2019 12:38:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCvVLuUwquApNzp2R6F/dvoUKLJ8V3J+jFdkY4PHDNsoqu57YxNMPBbOo4cNpBHQNddFV1 X-Received: by 2002:aa7:8102:: with SMTP id b2mr38630600pfi.105.1564429092478; Mon, 29 Jul 2019 12:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429092; cv=none; d=google.com; s=arc-20160816; b=I3+/yk0mkB0U9PghgyINV901HECTrODsGt/ZyzRZ+2noD/HWbAIP7eRS3VlKJVCSRU H1SR4Sb2mlZGZsluxJ+C3IsJGBdPS6SHZ94cz17Ju1IIuYBhD1KZzAqCuwoj2NT0cwuw ozzhQ93srIZRLvR3oifB2LQlETX1xKan7/aLNjgeEtRLiAKV0Q1dBqNXSCKj2I/cKNFv TPQDFpLOsKsW1bd5e0RCWh0aH+6fgQUwryQ3zjqfG0rMeEoqv/GSkz7S4AKjRlE/ELTS dug3Q7+H9eem2vQNEQYG5VhaQmtUE5eC2Nfk0EwFXAByUvWkwe6hjPioicFBagBIdgbB C1lQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/Dfc7BLbHyO4aet66DTKxbQxwTtFubh6LK4caOlsq0U=; b=rTIDZdiF+2vLbq6KqlQs1eszq2r4esBgfuI6yHFl/3KP45jHm8XNBTz6tyo5GugLhE Ayc1G+83/TSPxlhmZ6Yx65k89ZPeRDl3q+9MT3kMeb+1hWdRmqZuybH41+IutqU3FMrw EIx4p1hwioUT2Rs84B4k4pAToTQ32NMJw2NR9NBu9Uhf3hMFud9RNy7Ai1JVOsqU9ZnD EC6cdFgN60c2WMpKKw2DLzLXEWtqn/k4eY8cAiphzzBOcpq+jhYtqSxnNN2sfSh46QzT yR41s5CAIftl6ctRZMMulT3TGzT0OMvejFQCkugx/9CgzrmqJqVCNfnGU2HgfwHFd19w FTig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RvfdL76h; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si31101326pge.95.2019.07.29.12.37.57; Mon, 29 Jul 2019 12:38:12 -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=RvfdL76h; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730190AbfG2Tgn (ORCPT + 99 others); Mon, 29 Jul 2019 15:36:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730031AbfG2Tgm (ORCPT ); Mon, 29 Jul 2019 15:36:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 AB6992171F; Mon, 29 Jul 2019 19:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429001; bh=v7sks2e6muLIM6cZO40Wu7vtz4iGZ6tb3NNZnvw9x8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RvfdL76hD5v8nCovSfxSj3Ma97xIZWkbRrYnsGNoGEJphRF3XADta9xeFnDW9XPSX 8mdyHzcJ4tN3ZWk5WC0ObhkpRs0lreyKcMiHZmWqv0c8cZIO4EJ2iwxqzS+hPWKCJj 9P6JFoWAc+Bqy/AF8clJ+NJf7HuzFj0riQIKzK5s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Axel Lin , Chen Feng , Lee Jones , Sasha Levin Subject: [PATCH 4.14 253/293] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Date: Mon, 29 Jul 2019 21:22:24 +0200 Message-Id: <20190729190843.829903786@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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 96c07fa1802a..6693f74aa6ab 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -112,6 +112,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