lkml.org 
[lkml]   [2018]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: sgtl5000: avoid division by zero if lo_vag is zero
On Thu, Sep 06, 2018 at 11:41:52AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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.
>

This is a very clever patch. How did you find the bug?

regards,
dan carpenter

\
 
 \ /
  Last update: 2018-09-06 13:59    [W:2.527 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site