mtd: mtdchar: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 5 Mar 2021 08:22:24 +0000 (02:22 -0600)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 11 Mar 2021 11:17:42 +0000 (12:17 +0100)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210305082224.GA137360@embeddedor
drivers/mtd/mtdchar.c

index 57c4a2f0b703208d142b1568bc818d4946590f69..998d86f46488296815fa5de09e22c6662598f650 100644 (file)
@@ -983,6 +983,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
                        if (!mtd_has_oob(mtd))
                                return -EOPNOTSUPP;
                        mfi->mode = arg;
+                       break;
 
                case MTD_FILE_MODE_NORMAL:
                        break;