Skip to contentSkip to conversation

mtd: nand: omap2: Cleanup a curly brace issue

PATCH In review Dan Carpenter 2 participants 2 messages Jul 14, 2016

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

PATCH 1/1 mtd: nand: omap2: Cleanup a curly brace issue

It doesn't affect runtime, but curly braces were obviously intended.

drivers/mtd/nand/omap2.c +2 -1
index a36ad3d..ab7c340 100644
@@ -1655,10 +1655,11 @@ static int omap_get_dt_info(struct device *dev, struct omap_nand_info *info)
 
 	/* detect availability of ELM module. Won't be present pre-OMAP4 */
 	info->elm_of_node = of_parse_phandle(child, "ti,elm-id", 0);
-	if (!info->elm_of_node)
+	if (!info->elm_of_node) {
 		info->elm_of_node = of_parse_phandle(child, "elm_id", 0);
 		if (!info->elm_of_node)
 			dev_dbg(dev, "ti,elm-id not in DT\n");
+	}
 
 	/* select ecc-scheme for NAND */
 	if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) {
#1 lore raw
Quoted 3 lines · Dan Carpenter

It doesn't affect runtime, but curly braces were obviously intended.

Thanks, but you're just a tad late ;)

http://patchwork.ozlabs.org/patch/648283/

Nice to point out that technically, the behavior doesn't really change though.

Brian

Quoted 17 lines
drivers/mtd/nand/omap2.c +2 -1
index a36ad3d..ab7c340 100644
@@ -1655,10 +1655,11 @@ static int omap_get_dt_info(struct device *dev, struct omap_nand_info *info)
 
 	/* detect availability of ELM module. Won't be present pre-OMAP4 */
 	info->elm_of_node = of_parse_phandle(child, "ti,elm-id", 0);
-	if (!info->elm_of_node)
+	if (!info->elm_of_node) {
 		info->elm_of_node = of_parse_phandle(child, "elm_id", 0);
 		if (!info->elm_of_node)
 			dev_dbg(dev, "ti,elm-id not in DT\n");
+	}
 
 	/* select ecc-scheme for NAND */
 	if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) {