Re: [PATCH][next] iio: tsl2x7x/tsl2772: avoid potential division by zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 31 May 2018 05:28:01 -0400
Brian Masney <masneyb@xxxxxxxxxxxxx> wrote:

> On Wed, May 30, 2018 at 07:19:36PM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> > 
> > It may be possible for tsl2772_get_lux to return a zero lux value
> > and hence a division by zero can occur when lux_val is zero. Check
> > for this case and return -ERANGE to avoid the division by zero.
> > 
> > Detected by CoverityScan, CID#1469484 ("Division or modulo by zero")
> > 
> > Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>  
> 
> Acked-by: Brian Masney <masneyb@xxxxxxxxxxxxx>

Applied to the fixes-togreg branch of iio.git.

As there was nothing in that branch that is going upstream until after
the merge window closes, I moved it forward to match staging/staging-next.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux