From: Jonathan Cameron <jic23@kernel.org>
To: Brian Masney <masneyb@onstation.org>
Cc: Colin King <colin.king@canonical.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: tsl2x7x/tsl2772: avoid potential division by zero
Date: Sun, 03 Jun 2018 15:12:34 +0000 [thread overview]
Message-ID: <20180603161234.008ac6c5@archlinux> (raw)
In-Reply-To: <20180531092801.bsmqujkfnge3xhpo@0dcddc0a723b>
On Thu, 31 May 2018 05:28:01 -0400
Brian Masney <masneyb@onstation.org> wrote:
> On Wed, May 30, 2018 at 07:19:36PM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > 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@canonical.com>
>
> Acked-by: Brian Masney <masneyb@onstation.org>
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
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Brian Masney <masneyb@onstation.org>
Cc: Colin King <colin.king@canonical.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: tsl2x7x/tsl2772: avoid potential division by zero
Date: Sun, 3 Jun 2018 16:12:34 +0100 [thread overview]
Message-ID: <20180603161234.008ac6c5@archlinux> (raw)
In-Reply-To: <20180531092801.bsmqujkfnge3xhpo@0dcddc0a723b>
On Thu, 31 May 2018 05:28:01 -0400
Brian Masney <masneyb@onstation.org> wrote:
> On Wed, May 30, 2018 at 07:19:36PM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > 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@canonical.com>
>
> Acked-by: Brian Masney <masneyb@onstation.org>
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
next prev parent reply other threads:[~2018-06-03 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 18:19 [PATCH][next] iio: tsl2x7x/tsl2772: avoid potential division by zero Colin King
2018-05-30 18:19 ` Colin King
2018-05-31 9:28 ` Brian Masney
2018-05-31 9:28 ` Brian Masney
2018-06-03 15:12 ` Jonathan Cameron [this message]
2018-06-03 15:12 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180603161234.008ac6c5@archlinux \
--to=jic23@kernel.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masneyb@onstation.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.