Skip to contentSkip to conversation

regmap: adds missing braces in regmap_init()

PATCH Applied Daeseok Youn 2 participants 2 messages Apr 1, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regmap: adds missing braces in regmap_init()

It need to add curly braces because the inner for "if" has two statements.

coccicheck says:
drivers/base/regmap/regmap.c:765:2-44:
code aligned with following code on line 766

---
 drivers/base/regmap/regmap.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/base/regmap/regmap.c +2 -1
index d0a0724..63e30ef 100644
@@ -761,10 +761,11 @@ skip_format_initialization:
 	if (ret != 0)
 		goto err_range;
 
-	if (dev)
+	if (dev) {
 		ret = regmap_attach_dev(dev, map, config);
 		if (ret != 0)
 			goto err_regcache;
+	}
 
 	return map;
 
Signature · 1 line
1.7.4.4
maintainer Applied
#1 lore raw
Quoted 3 lines · Daeseok Youn

It need to add curly braces because the inner for "if" has two statements.

Applied, thanks.