linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][iio-next] iio: light: noa1305: fix missing break in a switch statement
@ 2019-08-15  7:43 Colin King
  2019-08-18 17:14 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-08-15  7:43 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Martyn Welch, Sergei M, linux-iio
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There is a missing break for the NOA1305_INTEGR_TIME_400MS case,
fix it by adding it in.

Addresses-Coverity: ("Missing break in switch")
Fixes: 741172d18e8a ("iio: light: noa1305: Add support for NOA1305")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/iio/light/noa1305.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/light/noa1305.c b/drivers/iio/light/noa1305.c
index 7b859ae1044d..5ebfbc52f541 100644
--- a/drivers/iio/light/noa1305.c
+++ b/drivers/iio/light/noa1305.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][iio-next] iio: light: noa1305: fix missing break in a switch statement
  2019-08-15  7:43 [PATCH][iio-next] iio: light: noa1305: fix missing break in a switch statement Colin King
@ 2019-08-18 17:14 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-08-18 17:14 UTC (permalink / raw)
  To: Colin King
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Martyn Welch, Sergei M, linux-iio, kernel-janitors, linux-kernel

On Thu, 15 Aug 2019 08:43:39 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a missing break for the NOA1305_INTEGR_TIME_400MS case,
> fix it by adding it in.
> 
> Addresses-Coverity: ("Missing break in switch")
> Fixes: 741172d18e8a ("iio: light: noa1305: Add support for NOA1305")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Hi Colin

Fix already on it's way in.  Was also caught by 0-day.

Thanks,

Jonathan

> ---
>  drivers/iio/light/noa1305.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/light/noa1305.c b/drivers/iio/light/noa1305.c
> index 7b859ae1044d..5ebfbc52f541 100644
> --- a/drivers/iio/light/noa1305.c
> +++ b/drivers/iio/light/noa1305.c
> @@ -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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-18 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15  7:43 [PATCH][iio-next] iio: light: noa1305: fix missing break in a switch statement Colin King
2019-08-18 17:14 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).