diff options
author | Gabor Juhos <j4g8y7@gmail.com> | 2024-03-08 10:25:07 +0100 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-03-16 19:00:50 +0100 |
commit | e6f3dac9cf11eff1daddeaa69521370c8941a5f9 (patch) | |
tree | 67c162ab36f6f5308ace9ddbe9ffa99d871f186a /drivers/firmware/qcom | |
parent | firmware: qcom_scm: disable clocks if qcom_scm_bw_enable() fails (diff) | |
download | linux-e6f3dac9cf11eff1daddeaa69521370c8941a5f9.tar.xz linux-e6f3dac9cf11eff1daddeaa69521370c8941a5f9.zip |
firmware: qcom_scm: remove IS_ERR() checks from qcom_scm_bw_{en,dis}able()
Since the qcom_scm_probe() function returns with an error if
__scm->path contains an error pointer, it is not needed to
verify that again in the qcom_scm_bw_{en,dis}able() functions
so remove the superfluous IS_ERR() checks.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240308-qcom_scm-is_err-check-v1-1-9c3e1ceefafe@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/firmware/qcom')
-rw-r--r-- | drivers/firmware/qcom/qcom_scm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c index e8460626fb0c..49ddbcab0680 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -163,9 +163,6 @@ static int qcom_scm_bw_enable(void) if (!__scm->path) return 0; - if (IS_ERR(__scm->path)) - return -EINVAL; - mutex_lock(&__scm->scm_bw_lock); if (!__scm->scm_vote_count) { ret = icc_set_bw(__scm->path, 0, UINT_MAX); @@ -183,7 +180,7 @@ err_bw: static void qcom_scm_bw_disable(void) { - if (IS_ERR_OR_NULL(__scm->path)) + if (!__scm->path) return; mutex_lock(&__scm->scm_bw_lock); |