[PATCH 3/5] Staging: bcm: nvm.c: Removed indentation level by using continue statement

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

 



Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/nvm.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 4aa195c..edbd0f9 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -1049,22 +1049,23 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,
 						     offset + i,
 						     MAX_RW_SIZE);
 
-		if (bulk_read_stat == STATUS_SUCCESS) {
-			if (ad->ulFlashWriteSize == 1) {
-				for (j = 0; j < 16; j++) {
-					if (read_bk[j] != tmpbuff[i+j]) {
-						if (STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i + j, &tmpbuff[i+j])) {
-							return STATUS_FAILURE;
-						}
-					}
-				}
-			} else {
-				if (memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) {
-					if (STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i, &tmpbuff[i])) {
+		if (bulk_read_stat != STATUS_SUCCESS)
+			continue;
+
+		if (ad->ulFlashWriteSize == 1) {
+			for (j = 0; j < 16; j++) {
+				if (read_bk[j] != tmpbuff[i+j]) {
+					if (STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i + j, &tmpbuff[i+j])) {
 						return STATUS_FAILURE;
 					}
 				}
 			}
+		} else {
+			if (memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) {
+				if (STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i, &tmpbuff[i])) {
+					return STATUS_FAILURE;
+				}
+			}
 		}
 	}
 
-- 
2.0.2

_______________________________________________
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