Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450062 > unrolled thread

[PATCH] iio: chemical: atlas-ph-sensor: fix typo in val assignment

Started byColin King <colin.king@canonical.com>
First post2016-07-26 00:10 +0200
Last post2016-07-27 11:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iio: chemical: atlas-ph-sensor: fix typo in val assignment Colin King <colin.king@canonical.com> - 2016-07-26 00:10 +0200
    Re: [PATCH] iio: chemical: atlas-ph-sensor: fix typo in val assignment Matt Ranostay <mranostay@gmail.com> - 2016-07-27 11:40 +0200

#1450062 — [PATCH] iio: chemical: atlas-ph-sensor: fix typo in val assignment

FromColin King <colin.king@canonical.com>
Date2016-07-26 00:10 +0200
Subject[PATCH] iio: chemical: atlas-ph-sensor: fix typo in val assignment
Message-ID<rYWet-1Uf-5@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

Fix an incorrect assignment due to a typo on a variable name. The
variable val2 should be assigned 100000 and not val.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/iio/chemical/atlas-ph-sensor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
index ae038a5..407f141 100644
--- a/drivers/iio/chemical/atlas-ph-sensor.c
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
@@ -434,7 +434,7 @@ static int atlas_read_raw(struct iio_dev *indio_dev,
 			break;
 		case IIO_ELECTRICALCONDUCTIVITY:
 			*val = 1; /* 0.00001 */
-			*val = 100000;
+			*val2 = 100000;
 			break;
 		case IIO_CONCENTRATION:
 			*val = 0; /* 0.000000001 */
-- 
2.8.1

[toc] | [next] | [standalone]


#1451186

FromMatt Ranostay <mranostay@gmail.com>
Date2016-07-27 11:40 +0200
Message-ID<rZttM-5ZR-39@gated-at.bofh.it>
In reply to#1450062
On Mon, Jul 25, 2016 at 3:06 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Fix an incorrect assignment due to a typo on a variable name. The
> variable val2 should be assigned 100000 and not val.

Yikes! Good catch..

Reviewed-By: Matt Ranostay <mranostay@gmail.com>

>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/iio/chemical/atlas-ph-sensor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
> index ae038a5..407f141 100644
> --- a/drivers/iio/chemical/atlas-ph-sensor.c
> +++ b/drivers/iio/chemical/atlas-ph-sensor.c
> @@ -434,7 +434,7 @@ static int atlas_read_raw(struct iio_dev *indio_dev,
>                         break;
>                 case IIO_ELECTRICALCONDUCTIVITY:
>                         *val = 1; /* 0.00001 */
> -                       *val = 100000;
> +                       *val2 = 100000;
>                         break;
>                 case IIO_CONCENTRATION:
>                         *val = 0; /* 0.000000001 */
> --
> 2.8.1
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web