Commit a412ec27 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

regulator: qcom-rpm: signedness bug in probe()

"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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment