Skip to content

Commit e6f3dac

Browse files
juhosgandersson
authored andcommitted
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>
1 parent 0c50b7f commit e6f3dac

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/firmware/qcom/qcom_scm.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ static int qcom_scm_bw_enable(void)
163163
if (!__scm->path)
164164
return 0;
165165

166-
if (IS_ERR(__scm->path))
167-
return -EINVAL;
168-
169166
mutex_lock(&__scm->scm_bw_lock);
170167
if (!__scm->scm_vote_count) {
171168
ret = icc_set_bw(__scm->path, 0, UINT_MAX);
@@ -183,7 +180,7 @@ static int qcom_scm_bw_enable(void)
183180

184181
static void qcom_scm_bw_disable(void)
185182
{
186-
if (IS_ERR_OR_NULL(__scm->path))
183+
if (!__scm->path)
187184
return;
188185

189186
mutex_lock(&__scm->scm_bw_lock);

0 commit comments

Comments
 (0)