ASoC: pcm512x: Fix divide by zero issue
commit f073faa7 upstream. If den=1 and pllin_rate>20MHz then den and num are adjusted to 0 causing a divide by zero error a few lines further on. Therefore this patch correctly scales num and den such that pllin_rate/den < 20MHz as required in the device data sheet. Signed-off-by:Howard Mitchell <hm@hmbedded.co.uk> Signed-off-by:
Mark Brown <broonie@sirena.org.uk> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment