Bug 81621 - media/dvb-frontends/stv0900_sw.c:1738: bad switch statement ?
Summary: media/dvb-frontends/stv0900_sw.c:1738: bad switch statement ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(Other) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 08:34 UTC by David Binderman
Modified: 2014-08-21 18:51 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description David Binderman 2014-08-04 08:34:36 UTC
[linux-3.16/drivers/media/dvb-frontends/stv0900_sw.c:1738]: (style) Statements following return, break, continue, goto or throw will never be executed.

    switch (intp->srch_standard[demod]) {
    case STV0900_SEARCH_DVBS1:
        dprintk("Search Standard = DVBS1\n");
        break;
    case STV0900_SEARCH_DSS:
        dprintk("Search Standard = DSS\n");
    case STV0900_SEARCH_DVBS2:
        break;
        dprintk("Search Standard = DVBS2\n");
    case STV0900_AUTO_SEARCH:
    default:
        dprintk("Search Standard = AUTO\n");
        break;
    }

Maybe something like

    switch (intp->srch_standard[demod]) {
    case STV0900_SEARCH_DVBS1:
        dprintk("Search Standard = DVBS1\n");
        break;
    case STV0900_SEARCH_DSS:
        dprintk("Search Standard = DSS\n");
        break;
    case STV0900_SEARCH_DVBS2:
        dprintk("Search Standard = DVBS2\n");
        break;
    case STV0900_AUTO_SEARCH:
    default:
        dprintk("Search Standard = AUTO\n");
        break;
    }

would be better.
Comment 1 Andrey Utkin 2014-08-04 20:05:30 UTC
Thanks. Patch sent, see "[PATCH] drivers/media/dvb-frontends/stv0900_sw.c: Fix break placement"

Note You need to log in before you can comment on or make changes to this bug.