diff --git a/drivers/clock_control/clock_control_npcx.c b/drivers/clock_control/clock_control_npcx.c index 9b52af4ae8a..db8e0072b4a 100644 --- a/drivers/clock_control/clock_control_npcx.c +++ b/drivers/clock_control/clock_control_npcx.c @@ -39,7 +39,7 @@ static inline int npcx_clock_control_on(const struct device *dev, struct npcx_clk_cfg *clk_cfg = (struct npcx_clk_cfg *)(sub_system); const uint32_t pmc_base = DRV_CONFIG(dev)->base_pmc; - if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT || clk_cfg->bit >= 8) + if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT) return -EINVAL; /* Clear related PD (Power-Down) bit of module to turn on clock */ @@ -54,7 +54,7 @@ static inline int npcx_clock_control_off(const struct device *dev, struct npcx_clk_cfg *clk_cfg = (struct npcx_clk_cfg *)(sub_system); const uint32_t pmc_base = DRV_CONFIG(dev)->base_pmc; - if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT || clk_cfg->bit >= 8) + if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT) return -EINVAL; /* Set related PD (Power-Down) bit of module to turn off clock */