- /* Check if user has supplied the dongle id or not */
- if (!dongle_id) {
+ /* Check if user has supplied a valid dongle id or not */
+ if ((dongle_id <= 0) ||
+ (dongle_id >= (sizeof(dongle_types) / sizeof(dongle_types[0]))) ) {
dongle_id = nsc_ircc_read_dongle_id(self->io.fir_base);
MESSAGE("%s, Found dongle: %s\n", driver_name,
dongle_id = nsc_ircc_read_dongle_id(self->io.fir_base);
MESSAGE("%s, Found dongle: %s\n", driver_name,
MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");
module_init(nsc_ircc_init);
MODULE_PARM_DESC(dongle_id, "Type-id of used dongle");
module_init(nsc_ircc_init);