From 9a00daf9dd0a25da45a43142ca27126e6e26a622 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Mon, 28 Nov 2022 14:57:06 +0100 Subject: [PATCH] fix(st-regulator): use Boolean type for tests 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 Change-Id: Iacc58349cc3ab558fb4ffe0605a623e84e21e035 --- drivers/st/regulator/regulator_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/st/regulator/regulator_core.c b/drivers/st/regulator/regulator_core.c index f15e22ac0..2a5d0f7ae 100644 --- a/drivers/st/regulator/regulator_core.c +++ b/drivers/st/regulator/regulator_core.c @@ -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; } -- 2.39.5