From: Jonathan Cameron <jic23@kernel.org>
To: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <mcoquelin.stm32@gmail.com>,
<alexandre.torgue@st.com>, <benjamin.gaignard@st.com>,
<benjamin.gaignard@linaro.org>, <linux-iio@vger.kernel.org>,
<lars@metafoo.de>, <knaack.h@gmx.de>, <pmeerw@pmeerw.net>
Subject: Re: [PATCH] iio: adc: stm32: fix bad error check on max_channels
Date: Sun, 24 Sep 2017 14:09:19 +0100 [thread overview]
Message-ID: <20170924140919.669c9cca@archlinux> (raw)
In-Reply-To: <1505751855-15490-1-git-send-email-fabrice.gasnier@st.com>
On Mon, 18 Sep 2017 18:24:15 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> Fix a bad error check when counting 'st,adc-channels' array elements.
> This is seen when all channels are in use simultaneously.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Applied to fixes-togreg-post-rc1, fixes tag added and marked for
stable.
Jonathan
> ---
> drivers/iio/adc/stm32-adc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index e3c15f8..4df32cf 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
> @@ -1666,7 +1666,7 @@ static int stm32_adc_chan_of_init(struct iio_dev *indio_dev)
>
> num_channels = of_property_count_u32_elems(node, "st,adc-channels");
> if (num_channels < 0 ||
> - num_channels >= adc_info->max_channels) {
> + num_channels > adc_info->max_channels) {
> dev_err(&indio_dev->dev, "Bad st,adc-channels?\n");
> return num_channels < 0 ? num_channels : -EINVAL;
> }
WARNING: multiple messages have this Message-ID (diff)
From: jic23@kernel.org (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iio: adc: stm32: fix bad error check on max_channels
Date: Sun, 24 Sep 2017 14:09:19 +0100 [thread overview]
Message-ID: <20170924140919.669c9cca@archlinux> (raw)
In-Reply-To: <1505751855-15490-1-git-send-email-fabrice.gasnier@st.com>
On Mon, 18 Sep 2017 18:24:15 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> Fix a bad error check when counting 'st,adc-channels' array elements.
> This is seen when all channels are in use simultaneously.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Applied to fixes-togreg-post-rc1, fixes tag added and marked for
stable.
Jonathan
> ---
> drivers/iio/adc/stm32-adc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index e3c15f8..4df32cf 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
> @@ -1666,7 +1666,7 @@ static int stm32_adc_chan_of_init(struct iio_dev *indio_dev)
>
> num_channels = of_property_count_u32_elems(node, "st,adc-channels");
> if (num_channels < 0 ||
> - num_channels >= adc_info->max_channels) {
> + num_channels > adc_info->max_channels) {
> dev_err(&indio_dev->dev, "Bad st,adc-channels?\n");
> return num_channels < 0 ? num_channels : -EINVAL;
> }
next prev parent reply other threads:[~2017-09-24 13:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 16:24 [PATCH] iio: adc: stm32: fix bad error check on max_channels Fabrice Gasnier
2017-09-18 16:24 ` Fabrice Gasnier
2017-09-24 13:09 ` Jonathan Cameron [this message]
2017-09-24 13:09 ` 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=20170924140919.669c9cca@archlinux \
--to=jic23@kernel.org \
--cc=alexandre.torgue@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=benjamin.gaignard@st.com \
--cc=fabrice.gasnier@st.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--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.