Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4206845imb; Wed, 6 Mar 2019 07:51:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwTv0xFXu5t26ChgIgzsM8OaKQF+uhzlIy3BAaljczIIxJDfiTVF9GNDxsGs7qWRfZOvuy1 X-Received: by 2002:a63:1105:: with SMTP id g5mr6861648pgl.322.1551887501686; Wed, 06 Mar 2019 07:51:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551887501; cv=none; d=google.com; s=arc-20160816; b=jh5/KqEue4mloeks/YU9B0HIFHcgBrP65iZbhvlP63JsVSDhIHwKa0FVrLhZl8Ohe8 8BNuJS8zOqIacM4aiYEuFt7ufquAvfbnlZMrNJfKGP0nm9gqYQelCV5UMSkyQQq5a2bn vLojFVaOtOg1JC44PT3XNW+St4mgb+8J7J3tkL+B71eRemMQaBdrPKNn2VcXQ971lsUJ edmYEp3vsUOnp/uW34MG6UfERfPtmYy8g0y9ZxdQSKf6wF1IaJG72Gw3xWGKRXscYFWV Y8f1tYwrmYIhQwzr4PUUgZxdIErd5d2RN+E4rFKEr31A7+HJO5rMTzjEr91nK1xCA/oF nQ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=SZfhpALKUvjXqolUDGnnDLLSa1wSeT7YJc6melV9Zxg=; b=qEFa3JtFmjbS81xIyoHH01I6yI4sYmLD7wNDol6oacgVOCXoYFiI9JlXzPt+tGaHV0 GicSqVCskfTZLqO4anfi/ezjmW/9ya5gzld2vkJ0QWHjvvqkT84+MUrxthjh+30eGzHL Ea1791V6S8BiH1olGAUL7Osd+ak4ymw0LgsnN9zI3F7bnEuDnlUCyxIE5N7Zh4UpqCRS laA8jIQu8wDR3SahUX96AZtuTha6FJRn2woRfbszhWrCWgrvKDjd4eQ43pPiUj0MTyVS jlEpkOP8VZMekOucooA9d+zEn7bzz+u7jAdzO3sJfD7Ki3A/CdyEBT5+2fgCbFz+AJe3 qCzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=vRrV0Vpl; 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 x17si1778242plr.435.2019.03.06.07.51.26; Wed, 06 Mar 2019 07:51:41 -0800 (PST) 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=@ingics-com.20150623.gappssmtp.com header.s=20150623 header.b=vRrV0Vpl; 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 S1726737AbfCFNuC (ORCPT + 99 others); Wed, 6 Mar 2019 08:50:02 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36947 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfCFNuC (ORCPT ); Wed, 6 Mar 2019 08:50:02 -0500 Received: by mail-pg1-f195.google.com with SMTP id q206so8479650pgq.4 for ; Wed, 06 Mar 2019 05:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=SZfhpALKUvjXqolUDGnnDLLSa1wSeT7YJc6melV9Zxg=; b=vRrV0Vpl2RwhenLKKyGJ4AMctTBgRYh7vncRdEsZsEMIDIr6MZPMBiqdzN6yUVq+jZ 4UbYHCgqb6uKvL/OGOkxZZ2ZrSX5q05xcGQYJFjuH+cC8tI2AQG/s41LPG+phawegzAO wTQElNX60dpkyXAxV/l92/+3lZPfqS2/zsnQYthDxXBeagNff5HHSiExwp/WVIyW3iO5 kdnljICZI2BXqiIPvV4SYpNs/xwP8RDoJrCMtFg9ud2Q9pSXvEGsOp89gX9yy6ZOlW5/ J3GIZ0ZoTtGEsWY80WwZ92Ep+690B/lTYcPIqs1YEIoimNyEhUazGq17ddJX4voiiIVe rf6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SZfhpALKUvjXqolUDGnnDLLSa1wSeT7YJc6melV9Zxg=; b=bR0KeQqLAloVnSuxTLVR3xUPQBvYMnuNIo1WUTDJHjqyRsNv+2IFmnbuUFWPe5aike vvfKrSiVuwyaagrNksz3kMb0EJcJ4usPPAOzhF6mDvlZsNa3Mg4ePdYExq7P+ukzJcCn gj6XCxckqYXAmldOrC+MYn4QGoJ/44uXawa2kfmG24hpxtzUds5+GHflK1I221WGhZFj KdiRemZqevhgbWYDmEhw2KaGvr/gFUhX4sam9t1dLuu/ru5a0FqqaG74A5VQ8GOGdpWF +30rruKOB4omSd1wC7+ICBVncMLXl1acE4bntjgRXPLiXMT3QX9feN2/H0Dm/pYyPHnk P/Xg== X-Gm-Message-State: APjAAAVNpsqJr3taq3p1XJ+ZgByUsxzZQBZOVqpuG8Z1KJYcimsGKKNB DeQ/4oTOJJxPipGOyvhAHb4gKg== X-Received: by 2002:a63:591f:: with SMTP id n31mr6291183pgb.304.1551880201304; Wed, 06 Mar 2019 05:50:01 -0800 (PST) Received: from localhost.localdomain (218-164-96-47.dynamic-ip.hinet.net. [218.164.96.47]) by smtp.gmail.com with ESMTPSA id f125sm3966301pfc.91.2019.03.06.05.49.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 05:50:00 -0800 (PST) From: Axel Lin To: Lee Jones Cc: Chen Feng , linux-kernel@vger.kernel.org, Axel Lin Subject: [PATCH] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Date: Wed, 6 Mar 2019 21:49:49 +0800 Message-Id: <20190306134949.31883-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin --- 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.17.1