diff mbox

[media] dvb-frontends/tda18271c2dd: silence sparse fall through warning

Message ID 20180624134250.8321-1-d.scheller.oss@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Scheller June 24, 2018, 1:42 p.m. UTC
From: Daniel Scheller <d.scheller@gmx.net>

Add a break statement in set_params() for the SYS_DVBT(2) case to silence
this sparse warning:

    drivers/media/dvb-frontends/tda18271c2dd.c:1144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

as reported in Hans' daily media_tree builds.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
 drivers/media/dvb-frontends/tda18271c2dd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mauro Carvalho Chehab July 30, 2018, 5:16 p.m. UTC | #1
Em Sun, 24 Jun 2018 15:42:50 +0200
Daniel Scheller <d.scheller.oss@gmail.com> escreveu:

> From: Daniel Scheller <d.scheller@gmx.net>
> 
> Add a break statement in set_params() for the SYS_DVBT(2) case to silence
> this sparse warning:
> 
>     drivers/media/dvb-frontends/tda18271c2dd.c:1144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> as reported in Hans' daily media_tree builds.
> 
> Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
> ---
>  drivers/media/dvb-frontends/tda18271c2dd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c
> index 2e1d36ae943b..fcffc7b4acf7 100644
> --- a/drivers/media/dvb-frontends/tda18271c2dd.c
> +++ b/drivers/media/dvb-frontends/tda18271c2dd.c
> @@ -1154,6 +1154,7 @@ static int set_params(struct dvb_frontend *fe)
>  		default:
>  			return -EINVAL;
>  		}
> +		break;

This actually seems to be a bug. Did you test this patch with
an actual hardware?

Regards,
Mauro

Thanks,
Mauro
diff mbox

Patch

diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c
index 2e1d36ae943b..fcffc7b4acf7 100644
--- a/drivers/media/dvb-frontends/tda18271c2dd.c
+++ b/drivers/media/dvb-frontends/tda18271c2dd.c
@@ -1154,6 +1154,7 @@  static int set_params(struct dvb_frontend *fe)
 		default:
 			return -EINVAL;
 		}
+		break;
 	case SYS_DVBC_ANNEX_A:
 	case SYS_DVBC_ANNEX_C:
 		if (bw <= 6000000)