Volume: Code cleanup for minimum gain value limiting

This patch changes the condition for limiting the smallest gain to
eliminate a never executed code part when VOL_MIN is defined as zero. The
variable v is unsigned integer so less than zero is not possible.
The functionality is not modified by this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2017-12-20 12:01:17 +02:00 committed by Liam Girdwood
parent 53976e4c38
commit 33b144d2fe
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ static inline void volume_set_chan(struct comp_dev *dev, int chan, uint32_t vol)
* multiplication overflow with the 32 bit value. Non-zero MIN option
* can be useful to prevent totally muted small volume gain.
*/
if (v < VOL_MIN)
if (v <= VOL_MIN)
v = VOL_MIN;
if (v > VOL_MAX)