@@ -202,7 +202,7 @@ static int __deprecated freq_to_opp(u8 *opp_id, enum opp_t opp_t,
BUG_ON(opp_t >= OPP_TYPES_MAX);
opp = opp_find_freq_ceil(opp_t, &freq);
- if (IS_ERR(opp))
+ if (!opp)
return -EINVAL;
*opp_id = opp_get_opp_id(opp);
return 0;
@@ -129,7 +129,7 @@ struct omap_opp *opp_find_freq_exact(enum opp_t opp_t,
if (unlikely(opp_t >= OPP_TYPES_MAX)) {
pr_err("%s: Invalid parameters being passed\n", __func__);
- return ERR_PTR(-EINVAL);
+ return NULL;
}
oppl = _opp_list[opp_t];
@@ -143,7 +143,7 @@ struct omap_opp *opp_find_freq_exact(enum opp_t opp_t,
oppl++;
}
- return OPP_TERM(oppl) ? ERR_PTR(-ENOENT) : oppl;
+ return OPP_TERM(oppl) ? NULL : oppl;
}
struct omap_opp *opp_find_freq_ceil(enum opp_t opp_t, unsigned long *freq)
@@ -153,7 +153,7 @@ struct omap_opp *opp_find_freq_ceil(enum opp_t opp_t, unsigned long *freq)
if (unlikely(opp_t >= OPP_TYPES_MAX || !freq ||
IS_ERR(freq))) {
pr_err("%s: Invalid parameters being passed\n", __func__);
- return ERR_PTR(-EINVAL);
+ return NULL;
}
oppl = _opp_list[opp_t];
@@ -169,7 +169,7 @@ struct omap_opp *opp_find_freq_ceil(enum opp_t opp_t, unsigned long *freq)
}
if (OPP_TERM(oppl))
- return ERR_PTR(-ENOENT);
+ return NULL;
*freq = oppl->rate;
@@ -183,7 +183,7 @@ struct omap_opp *opp_find_freq_floor(enum opp_t opp_t, unsigned long *freq)
if (unlikely(opp_t >= OPP_TYPES_MAX || !freq ||
IS_ERR(freq))) {
pr_err("%s: Invalid parameters being passed\n", __func__);
- return ERR_PTR(-EINVAL);
+ return NULL;
}
oppl = prev_opp = _opp_list[opp_t];
@@ -202,7 +202,7 @@ struct omap_opp *opp_find_freq_floor(enum opp_t opp_t, unsigned long *freq)
}
if (prev_opp->rate > *freq)
- return ERR_PTR(-ENOENT);
+ return NULL;
*freq = prev_opp->rate;