ARM: OMAP3+: SmartReflex: micro-optimization for sanity check
authorFelipe Balbi <balbi@ti.com>
Wed, 29 Feb 2012 22:33:47 +0000 (23:33 +0100)
committerKevin Hilman <khilman@ti.com>
Mon, 5 Mar 2012 19:29:27 +0000 (11:29 -0800)
val && (val != 1) == val > 1

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/smartreflex.c

index f1db4c67c48a19b4dedd7699afe2e70467d92465..daf8053741f787e9ec2f6c226928689ca1c1a8f7 100644 (file)
@@ -886,7 +886,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
        }
 
        /* Sanity check */
-       if (val && (val != 1)) {
+       if (val > 1) {
                pr_warning("%s: Invalid argument %lld\n", __func__, val);
                return -EINVAL;
        }