Staging: bcm: Moved doubled if-block
authorMatthias Beyer <mail@beyermatthias.de>
Fri, 27 Jun 2014 09:55:15 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jun 2014 21:29:42 +0000 (14:29 -0700)
This patch moves the doubled if block inside the retval-checking one
level up.

As the if-else-block it was in is now a one-statement if-else block,
I removed the braces from it.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/DDRInit.c

index ac45ead103206edb2f40ead40fdea4814de9b95e..d2646d9652113c5f01782ed6adddfb086db14929 100644 (file)
@@ -1214,21 +1214,15 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter)
                retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value, sizeof(value));
                ul_ddr_setting_load_addr += sizeof(ULONG);
                if (!retval) {
-                       if (bOverrideSelfRefresh && (psDDRSetting->ulRegAddress == 0x0F007018)) {
+                       if (bOverrideSelfRefresh && (psDDRSetting->ulRegAddress == 0x0F007018))
                                value = (psDDRSetting->ulRegValue | (1<<8));
-                               if (STATUS_SUCCESS != wrmalt(Adapter, ul_ddr_setting_load_addr,
-                                               &value, sizeof(value))) {
-                                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
-                                       break;
-                               }
-                       } else {
+                       else
                                value = psDDRSetting->ulRegValue;
 
-                               if (STATUS_SUCCESS != wrmalt(Adapter, ul_ddr_setting_load_addr,
+                       if (STATUS_SUCCESS != wrmalt(Adapter, ul_ddr_setting_load_addr,
                                        &value, sizeof(value))) {
-                                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
-                                       break;
-                               }
+                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
+                               break;
                        }
                }
                ul_ddr_setting_load_addr += sizeof(ULONG);