Commit b662bc50 authored by Darshan Rathod's avatar Darshan Rathod Committed by Johannes Berg
Browse files

wifi: brcmfmac: avoid assignment in if/else-if conditions in NVRAM load path



The NVRAM selection logic in brcmf_fw_request_nvram_done() used
patterns like:

    if ((data = bcm47xx_nvram_get_contents(&data_len)))
        free_bcm47xx_nvram = true;
    else if ((data = brcmf_fw_nvram_from_efi(&data_len)))
        kfree_nvram = true;

This style violates kernel coding style guidelines and triggers
checkpatch.pl errors. It also slightly reduces readability.

Refactor these cases by separating the assignment and the check,
ensuring behavior remains identical while complying with coding
standards.

Signed-off-by: default avatarDarshan Rathod <darshanrathod475@gmail.com>
Acked-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20250812123636.2142292-1-darshanrathod475@gmail.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1373f941
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment