Skip to content

Commit dfb1042

Browse files
hvilleneuvedoogregkh
authored andcommitted
serial: sc16is7xx: add explicit return for some switch default cases
Allows to simplify code by removing the break statement in the default switch/case in some functions. Reviewed-by: Andy Shevchenko <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Hugo Villeneuve <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent acd7f11 commit dfb1042

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/tty/serial/sc16is7xx.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,8 @@ static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg)
460460
case SC16IS7XX_IOCONTROL_REG:
461461
return true;
462462
default:
463-
break;
463+
return false;
464464
}
465-
466-
return false;
467465
}
468466

469467
static bool sc16is7xx_regmap_precious(struct device *dev, unsigned int reg)
@@ -472,10 +470,8 @@ static bool sc16is7xx_regmap_precious(struct device *dev, unsigned int reg)
472470
case SC16IS7XX_RHR_REG:
473471
return true;
474472
default:
475-
break;
473+
return false;
476474
}
477-
478-
return false;
479475
}
480476

481477
static bool sc16is7xx_regmap_noinc(struct device *dev, unsigned int reg)

0 commit comments

Comments
 (0)