[PATCH -next] interconnect: qcom: fix return value of qnoc_probe

From: YueHaibing
Date: Thu Sep 06 2018 - 21:35:23 EST


Fixes gcc '-Wunused-but-set-variable' warning:

drivers/interconnect/qcom/msm8916.c: In function 'qnoc_probe':
drivers/interconnect/qcom/msm8916.c:439:7: warning:
variable 'ret' set but not used [-Wunused-but-set-variable]

if icc_node_create failed, err code 'ret' will be returned,
so it cannot be a local variable in for-loop.

Fixes: 8d9300299a40 ("interconnect: qcom: Add msm8916 interconnect provider driver")
Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
drivers/interconnect/qcom/msm8916.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/interconnect/qcom/msm8916.c b/drivers/interconnect/qcom/msm8916.c
index 74145f4..0e33fdf 100644
--- a/drivers/interconnect/qcom/msm8916.c
+++ b/drivers/interconnect/qcom/msm8916.c
@@ -436,7 +436,6 @@ static int qnoc_probe(struct platform_device *pdev)
}

for (i = 0; i < num_nodes; i++) {
- int ret;
size_t j;

node = icc_node_create(qnodes[i]->id);