Clang warns:
../drivers/power/supply/qcom/msm_bcl.c:230:42: warning: address of array
'bcl[BCL_PARAM_VOLTAGE]->thresh' will always evaluate to 'true'
[-Wpointer-bool-conversion]
if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../drivers/power/supply/qcom/msm_bcl.c:231:31: warning: address of array
'bcl[BCL_PARAM_CURRENT]->thresh' will always evaluate to 'true'
[-Wpointer-bool-conversion]
|| !bcl[BCL_PARAM_CURRENT]->thresh) {
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
2 warnings generated.
Fixes:
77dd35597191 ("qpnp: Add snapshot of some qpnp, regulator and charger drivers")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
int ret = 0, i = 0;
struct bcl_param_data *param_data = NULL;
- if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh
- || !bcl[BCL_PARAM_CURRENT]->thresh) {
+ if (!bcl[i]) {
pr_err("BCL not initialized\n");
return -EINVAL;
}