Commit aabaf67f authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: nvm.c: Removed indentation level by concatenating nested if statements

parent f3ebe237
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -1054,20 +1054,18 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,

		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])) {
				if ((read_bk[j] != tmpbuff[i+j]) &&
				    (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 ((memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) &&
			    ((STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i, &tmpbuff[i])))) {
				return STATUS_FAILURE;
			}
		}
	}
	}

	return STATUS_SUCCESS;
}