arm: tegra: fuse: fix fuse_pgm_cycles error check
Shardar Shariff Md [Thu, 5 Sep 2013 10:50:02 +0000 (15:50 +0530)]
fuse_gpm_cycles error check to be checked with 0
instead its checked with non zero value

Change-Id: I473f7185b7929b0aaa38bcb6b8c2210373bbc895
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/270769
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ken Chang <kenc@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

arch/arm/mach-tegra/tegra_fuse.c

index f34da2b..6596a29 100644 (file)
@@ -1038,7 +1038,7 @@ int tegra_fuse_program(struct fuse_data *pgm_data, u32 flags)
        fuse_pgm_cycles = fuse_get_pgm_cycles(index);
        pr_debug("%s: use %d programming cycles\n", __func__,
                                                fuse_pgm_cycles);
-       if (fuse_pgm_cycles)
+       if (fuse_pgm_cycles == 0)
                return -EPERM;
 
        clk_enable(clk_fuse);