lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] interconnect: qcom: fix return value of qnoc_probe
Date
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@huawei.com>
---
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);
\
 
 \ /
  Last update: 2018-09-07 03:35    [W:0.028 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site