Skip to content

Commit

Permalink
regmap: adds missing braces in regmap_init()
Browse files Browse the repository at this point in the history
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

Signed-off-by: Daeseok Youn <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
daeseokyoun authored and broonie committed Apr 1, 2014
1 parent 6cfec04 commit a7a037c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,11 @@ struct regmap *regmap_init(struct device *dev,
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;

Expand Down

0 comments on commit a7a037c

Please sign in to comment.