These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / media / platform / vivid / vivid-radio-rx.c
index c7651a5..f99092c 100644 (file)
@@ -195,6 +195,8 @@ int vivid_radio_rx_s_hw_freq_seek(struct file *file, void *fh, const struct v4l2
                        if (dev->radio_rx_freq >= vivid_radio_bands[band].rangelow &&
                            dev->radio_rx_freq <= vivid_radio_bands[band].rangehigh)
                                break;
+               if (band == TOT_BANDS)
+                       return -EINVAL;
                low = vivid_radio_bands[band].rangelow;
                high = vivid_radio_bands[band].rangehigh;
        }