Fix segfault when invalid TLV is passed

Fix segfault when invalid TLV is passed.
The invalid TLV entries must be ignored as error.
This commit is contained in:
Takashi Iwai 2006-08-23 15:44:09 +02:00
parent 4165a5bfd1
commit 66f3749cab

View file

@ -1022,7 +1022,7 @@ static int parse_db_range(struct selem_str *rec, unsigned int *tlv,
default: default:
break; break;
} }
return 1; /* not found */ return -EINVAL; /* not found */
} }
/* convert the given raw volume value to a dB gain /* convert the given raw volume value to a dB gain