From: Jonathan Cameron <jic23@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Tomasz Duszynski <tduszyns@gmail.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
Subject: Re: [PATCH] iio: chemical: sps30: fix a loop timeout test
Date: Sat, 09 Feb 2019 16:41:06 +0000 [thread overview]
Message-ID: <20190209164106.50de74f9@archlinux> (raw)
In-Reply-To: <20190209090350.GD4865@kadam>
On Sat, 9 Feb 2019 12:03:52 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The "while (tries--) {" loop is a postop so it exits with "tries" set
> to -1.
>
> Fixes: 232e0f6ddeae ("iio: chemical: add support for Sensirion SPS30 sensor")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks.
Applied to the togreg branch of iio.git. Should make it in before
the merge window so no need for stable etc.
thanks,
Jonathan
> ---
> drivers/iio/chemical/sps30.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c
> index e03a28a67146..375df5060ed5 100644
> --- a/drivers/iio/chemical/sps30.c
> +++ b/drivers/iio/chemical/sps30.c
> @@ -210,7 +210,7 @@ static int sps30_do_meas(struct sps30_state *state, s32 *data, int size)
> msleep_interruptible(300);
> }
>
> - if (!tries)
> + if (tries = -1)
> return -ETIMEDOUT;
>
> ret = sps30_do_cmd(state, SPS30_READ_DATA, tmp, sizeof(int) * size);
prev parent reply other threads:[~2019-02-09 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 9:03 [PATCH] iio: chemical: sps30: fix a loop timeout test Dan Carpenter
2019-02-09 16:41 ` Jonathan Cameron [this message]
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=20190209164106.50de74f9@archlinux \
--to=jic23@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=tduszyns@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox