Bug 60768 - [TRIVIAL]sound/soc/blackfin/bf5xx-i2s.c:123: possible missing break ?
Summary: [TRIVIAL]sound/soc/blackfin/bf5xx-i2s.c:123: possible missing break ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 13:11 UTC by David Binderman
Modified: 2013-11-13 17:07 UTC (History)
2 users (show)

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


Attachments

Description David Binderman 2013-08-19 13:11:17 UTC
I just ran the static analysis checker "cppcheck"
over the linux-3.11-rc6 source code.

It said

 [linux-3.11-rc6/sound/soc/blackfin/bf5xx-i2s.c:123] -> [linux-3.11-rc6/sound/soc/blackfin/bf5xx-i2
s.c:127]: (warning) Variable 'wdsize' is reassigned a value before the old one has been used. 'break
;' missing?

Source code is

    case SNDRV_PCM_FORMAT_S8:
        bf5xx_i2s->tcr2 |= 7;
        bf5xx_i2s->rcr2 |= 7;
        sport_handle->wdsize = 1;
    case SNDRV_PCM_FORMAT_S16_LE:
        bf5xx_i2s->tcr2 |= 15;
        bf5xx_i2s->rcr2 |= 15;
        sport_handle->wdsize = 2;
        break;

Suggest add break statement.
Comment 1 Takashi Iwai 2013-11-13 16:21:11 UTC
Thanks, I submitted the fix.

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