]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(st-regulator): use Boolean type for tests
authorYann Gautier <yann.gautier@st.com>
Mon, 28 Nov 2022 13:57:06 +0000 (14:57 +0100)
committerYann Gautier <yann.gautier@st.com>
Wed, 7 Dec 2022 13:18:31 +0000 (14:18 +0100)
This corrects MISRA C2012-14.4
The controlling expression of an if statement and the controlling
expression of an iteration-statement shall have essentially Boolean type.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iacc58349cc3ab558fb4ffe0605a623e84e21e035

drivers/st/regulator/regulator_core.c

index f15e22ac063f94b34b3a4a429995a73ee18172ce..2a5d0f7aea20f83605ca2f027d018e9c2c7d41e6 100644 (file)
@@ -158,7 +158,7 @@ int regulator_disable(struct rdev *rdev)
 
        assert(rdev != NULL);
 
-       if (rdev->flags & REGUL_ALWAYS_ON) {
+       if ((rdev->flags & REGUL_ALWAYS_ON) != 0U) {
                return 0;
        }