commit | d45f14f8d3c1633ec9c9ccf964e43612ad824dda | [log] [tgz] |
---|---|---|
author | Colin Ian King <colin.king@canonical.com> | Thu Sep 06 11:41:52 2018 +0100 |
committer | Jason Liu <jason.hui.liu@nxp.com> | Tue Feb 12 10:35:15 2019 +0800 |
tree | 8c395d9531a1b59796cdb6347138a8e4900e7cdc | |
parent | 56a61657168b1a74d619e0a4db0a025a9f0e0177 [diff] |
ASoC: sgtl5000: avoid division by zero if lo_vag is zero In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag is set to zero and later vol_quot is computed by dividing by lo_vag causing a division by zero error. Fix this by avoiding a zero division and set vol_quot to zero in this specific case so that the lowest setting for i is correctly set. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>