qcacmn: Update array boundary checks for regulatory API
The regulatory API reg_freq_to_chan_for_chlist() uses num_chans as the
bound to access the array chan_list. While an invalid index INVALID_CHANNEL
is prevented from accessing chan_list, values that are greater than
NUM_CHANNELS are not prevented from accessing the array.
Prevent access to the array when the index is greater than NUM_CHANNELS.
Since INVALID_CHANNEL is also greater than NUM_CHANNELS, the existing
condition that prevents access to the array when num_chans is
INVALID_CHANNEL can be removed.
Change-Id: I8b9793b84fc5b3a9406389fd3482673dd4667cfc
CRs-Fixed: 3196165