projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97bf6af
)
regulator: qcom-rpm: signedness bug in probe()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 28 Jan 2015 19:15:31 +0000
(22:15 +0300)
committer
Mark Brown
<broonie@kernel.org>
Wed, 28 Jan 2015 19:43:43 +0000
(19:43 +0000)
"force_mode" is a u32 so it is never "< 0", but because of type
promotion then comparing "== -1" will do what we want.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_rpm-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/qcom_rpm-regulator.c
b/drivers/regulator/qcom_rpm-regulator.c
index 8364ff331a81838c6e84fe822b17d434bfb74aa7..3ab65c62fdd534ba94a98db7dc4274888fd0ba75 100644
(file)
--- a/
drivers/regulator/qcom_rpm-regulator.c
+++ b/
drivers/regulator/qcom_rpm-regulator.c
@@
-768,7
+768,7
@@
static int rpm_reg_probe(struct platform_device *pdev)
break;
}
- if (force_mode
< 0
) {
+ if (force_mode
== -1
) {
dev_err(&pdev->dev, "invalid force mode\n");
return -EINVAL;
}