[PATCH 5/6] Staging: bcm: Moved doubled if-block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/DDRInit.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index d13cb49..423bfd9 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -1306,21 +1306,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);
-- 
2.0.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux