diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:19:24 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-07-23 02:31:20 +0300 |
| commit | fbcb7a625688b315f103a17f468c253adf127d2d (patch) | |
| tree | eef49ef4569b44d2924e5eb509299de8dab974a6 | |
| parent | 951595d6e75043df742ea96a39cea2ab2f618343 (diff) | |
Revert "power: supply: qcom: Remove useless NULL checks against thresh array in msm_bcl_enable"
This reverts commit e888051ea71eea569dcfd0445bbd672585a39041.
| -rw-r--r-- | drivers/power/supply/qcom/msm_bcl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/supply/qcom/msm_bcl.c b/drivers/power/supply/qcom/msm_bcl.c index b4347eed874c..aea3f4645897 100644 --- a/drivers/power/supply/qcom/msm_bcl.c +++ b/drivers/power/supply/qcom/msm_bcl.c @@ -227,7 +227,8 @@ int msm_bcl_enable(void) int ret = 0, i = 0; struct bcl_param_data *param_data = NULL; - if (!bcl[i]) { + if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh + || !bcl[BCL_PARAM_CURRENT]->thresh) { pr_err("BCL not initialized\n"); return -EINVAL; } |
