Bug 60768

Summary: [TRIVIAL]sound/soc/blackfin/bf5xx-i2s.c:123: possible missing break ?
Product: Drivers Reporter: David Binderman (dcb314)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.11.6 Subsystem:
Regression: No Bisected commit-id:

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.