Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0ec971fd authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho
Browse files

iwlwifi: remove resp_pkt NULL checks



Contrary to what some of the comments say, if rfkill was
asserted the transport will return -ERFKILL instead of
success, if CMD_WANT_SKB was set, so it's not necessary
to check cmd.resp_pkt for being NULL if the return code
was success.

Validate that this is true in iwl_trans_send_cmd().

Most of the other code modifications were done with the
following spatch:
    @@
    struct iwl_host_cmd cmd;
    identifier pkt;
    @@
    <...
    (
    pkt = cmd.resp_pkt;
    ...
    -if (!pkt) { ... }
    |
    pkt = cmd.resp_pkt;
    ...
    -if (WARN_ON(!pkt)) { ... }
    |
    -if (!cmd.resp_pkt) { ... }
    )
    ...>

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 664e968b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment