lkml.org 
[lkml]   [2021]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] media: dvb-frontends: dib0090: Delete 'break' after 'goto'
On Fri, Jun 18, 2021 at 03:07:07PM +0800, lijian_8010a29@163.com wrote:
> From: lijian <lijian@yulong.com>
>
> break is not useful after a goto, so delete 'break' after 'goto',
> and delete reused 'goto identification_error;'.
>
> Signed-off-by: lijian <lijian@yulong.com>
> ---
> drivers/media/dvb-frontends/dib0090.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c
> index 903da33642df..9179fe1bd713 100644
> --- a/drivers/media/dvb-frontends/dib0090.c
> +++ b/drivers/media/dvb-frontends/dib0090.c
> @@ -403,8 +403,6 @@ static int dib0090_identify(struct dvb_frontend *fe)
> break;
> case P1A_B:
> dprintk("P1-A/B detected: driver is deactivated - not available\n");
> - goto identification_error;
> - break;

Removing both the break and the goto introduces a switch fallthrough; this
would need explicit marking with the fallthrough keyword.

Having said that, fallthrough isn't needed here. Best to avoid fallthrough
with all it pitfalls and just keep the goto.

> default:
> goto identification_error;
> }
> @@ -493,8 +491,6 @@ static int dib0090_fw_identify(struct dvb_frontend *fe)
> break;
> case P1A_B:
> dprintk("P1-A/B detected: driver is deactivated - not available\n");
> - goto identification_error;
> - break;

Same here.

> default:
> goto identification_error;
> }
> --
> 2.25.1

\
 
 \ /
  Last update: 2021-06-19 10:16    [W:0.032 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site