diff options
author | Matthias Beyer | 2014-07-20 15:14:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-07-21 12:30:42 -0700 |
commit | aabaf67f6f7417da74aa3b25edf3c647a12f3b9d (patch) | |
tree | fa8a9c9ac0cd5b18f4801a16ae82ca84bc6bffbd | |
parent | f3ebe23705515c6a032bb8386de19b4ee7863a50 (diff) |
Staging: bcm: nvm.c: Removed indentation level by concatenating nested if statements
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/bcm/nvm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index edbd0f9b6f97..c38c80347c19 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -1054,17 +1054,15 @@ 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])) { - return STATUS_FAILURE; - } + 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])) { - return STATUS_FAILURE; - } + if ((memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) && + ((STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i, &tmpbuff[i])))) { + return STATUS_FAILURE; } } } |