Skip to content

Commit 5faecb0

Browse files
GustavoARSilvagregkh
authored andcommitted
/dev/mem: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7fb2fd4 commit 5faecb0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/char/mem.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
765765
switch (orig) {
766766
case SEEK_CUR:
767767
offset += file->f_pos;
768+
/* fall through */
768769
case SEEK_SET:
769770
/* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */
770771
if ((unsigned long long)offset >= -MAX_ERRNO) {

0 commit comments

Comments
 (0)