aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/tps65217-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 3a2b839276fe..0a3df5b7c904 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -78,7 +78,7 @@ static int tps65217_vsel_to_uv1(unsigned int vsel)
78 78
79static int tps65217_uv_to_vsel1(int uV, unsigned int *vsel) 79static int tps65217_uv_to_vsel1(int uV, unsigned int *vsel)
80{ 80{
81 if ((uV < 0) && (uV > 3300000)) 81 if (uV < 0 || uV > 3300000)
82 return -EINVAL; 82 return -EINVAL;
83 83
84 if (uV <= 1500000) 84 if (uV <= 1500000)
@@ -112,7 +112,7 @@ static int tps65217_vsel_to_uv2(unsigned int vsel)
112 112
113static int tps65217_uv_to_vsel2(int uV, unsigned int *vsel) 113static int tps65217_uv_to_vsel2(int uV, unsigned int *vsel)
114{ 114{
115 if ((uV < 0) && (uV > 3300000)) 115 if (uV < 0 || uV > 3300000)
116 return -EINVAL; 116 return -EINVAL;
117 117
118 if (uV <= 1900000) 118 if (uV <= 1900000)