lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1339220131-24189-1-git-send-email-festevam@gmail.com>
Date:	Sat,  9 Jun 2012 02:35:30 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	sameo@...ux.intel.com
Cc:	linux-kernel@...r.kernel.org, broonie@...nsource.wolfsonmicro.com,
	u.kleine-koenig@...gutronix.de,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH 1/2] mfd: mc13xxx-i2c: Convert to devm_regmap_init_i2c()

From: Fabio Estevam <fabio.estevam@...escale.com>

Current code misses a "regmap_exit(mc13xxx->regmap)" in the error and remove paths.

Converting to devm_regmap_init_i2c() makes the regmap_exit unnecessary.

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 drivers/mfd/mc13xxx-i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/mc13xxx-i2c.c b/drivers/mfd/mc13xxx-i2c.c
index d22501d..0e38672 100644
--- a/drivers/mfd/mc13xxx-i2c.c
+++ b/drivers/mfd/mc13xxx-i2c.c
@@ -72,7 +72,7 @@ static int mc13xxx_i2c_probe(struct i2c_client *client,
 	mc13xxx->dev = &client->dev;
 	mutex_init(&mc13xxx->lock);
 
-	mc13xxx->regmap = regmap_init_i2c(client, &mc13xxx_regmap_i2c_config);
+	mc13xxx->regmap = devm_regmap_init_i2c(client, &mc13xxx_regmap_i2c_config);
 	if (IS_ERR(mc13xxx->regmap)) {
 		ret = PTR_ERR(mc13xxx->regmap);
 		dev_err(mc13xxx->dev, "Failed to initialize register map: %d\n",
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ