diff --git a/drivers/input/misc/qcom-hv-haptics.c b/drivers/input/misc/qcom-hv-haptics.c index 873aa2a0cbe8..4c8a8ca6a147 100644 --- a/drivers/input/misc/qcom-hv-haptics.c +++ b/drivers/input/misc/qcom-hv-haptics.c @@ -2721,15 +2721,15 @@ static int haptics_hw_init(struct haptics_chip *chip) return rc; /* get calibrated close loop period */ + t_lra_us = chip->config.t_lra_us; rc = haptics_get_closeloop_lra_period(chip, true); - if (rc < 0) - return rc; + if (!rc && chip->config.cl_t_lra_us != 0) + t_lra_us = chip->config.cl_t_lra_us; + else + dev_warn(chip->dev, "get closeloop LRA period failed, rc=%d\n", + rc); /* Config T_LRA */ - t_lra_us = chip->config.t_lra_us; - if (chip->config.cl_t_lra_us != 0) - t_lra_us = chip->config.cl_t_lra_us; - rc = haptics_config_openloop_lra_period(chip, t_lra_us); if (rc < 0) return rc;