From bb336fb77e6acfbc6a193ce430a25305a4d2bf9b Mon Sep 17 00:00:00 2001 From: Nathan Chancellor <natechancellor@gmail.com> Date: Sun, 3 Dec 2017 19:13:02 -0700 Subject: [PATCH] soc: qcom: qpnp-haptic_oem: Fix self assign Clang warnings As pointed out by Josh in the comments of 60e5a5f0b974, this seems like an addition that just isn't necessary. Self assign shouldn't be necessary here so we'll just reverse the condition and eliminate the self assignment. Reviewed-by: joshuous <joshuous@gmail.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> --- drivers/soc/qcom/qpnp-haptic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/soc/qcom/qpnp-haptic.c b/drivers/soc/qcom/qpnp-haptic.c index 63c0c49f6ba2..40b39c8ed632 100644 --- a/drivers/soc/qcom/qpnp-haptic.c +++ b/drivers/soc/qcom/qpnp-haptic.c @@ -1505,10 +1505,7 @@ static void update_lra_frequency(struct qpnp_hap *hap) lra_init_freq = 200000/temp; - if ((abs(lra_init_freq-235)*100/235) < 5) { - lra_auto_res_lo = lra_auto_res_lo; - lra_auto_res_hi = lra_auto_res_hi; - } else{ + if ((abs(lra_init_freq-235)*100/235) >= 5) { lra_auto_res_lo = 0x53; lra_auto_res_hi = 0x3; }