From 66f3749cabe91ce58b865adc56f22a56328517a2 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 23 Aug 2006 15:44:09 +0200 Subject: Fix segfault when invalid TLV is passed Fix segfault when invalid TLV is passed. The invalid TLV entries must be ignored as error. --- src/mixer/simple_none.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c index 1debacd8..9b217acc 100644 --- a/src/mixer/simple_none.c +++ b/src/mixer/simple_none.c @@ -1022,7 +1022,7 @@ static int parse_db_range(struct selem_str *rec, unsigned int *tlv, default: break; } - return 1; /* not found */ + return -EINVAL; /* not found */ } /* convert the given raw volume value to a dB gain -- cgit v1.2.1