• John Linville's avatar
    wireless: remove superfluous if statement in regulatory code · 841b351c
    John Linville authored
    Commit eeca9fce ('cfg80211: Schedule timeout for all CRDA calls')
    left behind a superfluous check after it removed some earlier code.
    
    In reg_process_hint, the test of "treatment == REG_REQ_IGNORE ||
    treatment == REG_REQ_ALREADY_SET" is superfluous because the code in the
    if-then branch is identical to the code after the if statement.
    
    Coverity CID #1295939
    
    I also removed the unnecessary assignment of treatment in this case,
    and added a comment reminding any future patch authors to ensure that
    treatment is properly assigned before it is used after the switch.
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    841b351c
reg.c 83.3 KB