Commit d6173692 authored by Felipe Balbi's avatar Felipe Balbi Committed by Kevin Hilman

ARM: OMAP3+: SmartReflex: micro-optimization for sanity check

val && (val != 1) == val > 1
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarJean Pihet <j-pihet@ti.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent 4018bfeb
...@@ -886,7 +886,7 @@ static int omap_sr_autocomp_store(void *data, u64 val) ...@@ -886,7 +886,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
} }
/* Sanity check */ /* Sanity check */
if (val && (val != 1)) { if (val > 1) {
pr_warning("%s: Invalid argument %lld\n", __func__, val); pr_warning("%s: Invalid argument %lld\n", __func__, val);
return -EINVAL; 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