diff options
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
| -rw-r--r-- | sound/soc/codecs/sgtl5000.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 60764f6201b1..add18d6d77da 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1218,7 +1218,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_component *component)  	 * Searching for a suitable index solving this formula:  	 * idx = 40 * log10(vag_val / lo_cagcntrl) + 15  	 */ -	vol_quot = (vag * 100) / lo_vag; +	vol_quot = lo_vag ? (vag * 100) / lo_vag : 0;  	lo_vol = 0;  	for (i = 0; i < ARRAY_SIZE(vol_quot_table); i++) {  		if (vol_quot >= vol_quot_table[i]) |