Skip to contentSkip to conversation

iio:light:noa1305: Fix missing break statement.

PATCH In review Jonathan Cameron 3 participants 3 messages Aug 13, 2019 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:light:noa1305: Fix missing break statement.

This got caught by the implicit fall through detection but is a bug rather than missing marking.

Reported-by 0-DAY kernel test infrastructure
Fixes 741172d18e8a ("iio: light: noa1305: Add support for NOA1305")
---
 drivers/iio/light/noa1305.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/noa1305.c +1 -0
index 7b859ae1044d..5ebfbc52f541 100644
@@ -85,6 +85,7 @@ static int noa1305_scale(struct noa1305_priv *priv, int *val, int *val2)
 	case NOA1305_INTEGR_TIME_400MS:
 		*val = 100;
 		*val2 = 77 * 4;
+		break;
 	case NOA1305_INTEGR_TIME_200MS:
 		*val = 100;
 		*val2 = 77 * 2;
Signature · 1 line
2.20.1
#1 lore raw
Quoted 25 lines · Jonathan Cameron

This got caught by the implicit fall through detection but is a bug rather than missing marking.

Reported-by 0-DAY kernel test infrastructure
Fixes 741172d18e8a ("iio: light: noa1305: Add support for NOA1305")
---
 drivers/iio/light/noa1305.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/noa1305.c +1 -0
index 7b859ae1044d..5ebfbc52f541 100644
@@ -85,6 +85,7 @@ static int noa1305_scale(struct noa1305_priv *priv, int *val, int *val2)
 	case NOA1305_INTEGR_TIME_400MS:
 		*val = 100;
 		*val2 = 77 * 4;
+		break;
 	case NOA1305_INTEGR_TIME_200MS:
 		*val = 100;
 		*val2 = 77 * 2;
Signature · 1 line
2.20.1

Gustavo, your work caught a bug _before_ it hit Linus's tree this time :)

I'll go queue this up now, thanks for the fast response Jonathan.

greg k-h

#2 lore raw
Quoted 20 lines · Greg KH
Quoted 19 lines · Jonathan Cameron

This got caught by the implicit fall through detection but is a bug rather than missing marking.

Reported-by 0-DAY kernel test infrastructure
Fixes 741172d18e8a ("iio: light: noa1305: Add support for NOA1305")
---
 drivers/iio/light/noa1305.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/noa1305.c +1 -0
index 7b859ae1044d..5ebfbc52f541 100644
@@ -85,6 +85,7 @@ static int noa1305_scale(struct noa1305_priv *priv, int *val, int *val2)
 	case NOA1305_INTEGR_TIME_400MS:
 		*val = 100;
 		*val2 = 77 * 4;
+		break;
Quoted 9 lines
Quoted 6 lines
drivers/iio/light/noa1305.c +0 -0
 	case NOA1305_INTEGR_TIME_200MS:
 		*val = 100;
 		*val2 = 77 * 2;
Signature · 1 line
2.20.1

Gustavo, your work caught a bug _before_ it hit Linus's tree this time :)

This is so great! I think I can now officially say: mission accomplished.

Thanks for sharing this with me. It made my day. :)

--
Gustavo