Blob Blame History Raw
From: Colin Ian King <colin.king@canonical.com>
Date: Fri, 29 Sep 2017 15:01:16 +0100
Subject: net_sched: remove redundant assignment to ret
Patch-mainline: v4.15-rc1
Git-commit: b1c49d14200dae47544f7ea6ee9040ded01f8425
References: bsc#1109837

The assignment of -EINVAL to variable ret is redundant as it
is being overwritten on the following error exit paths or
to the return value from the following call to basic_set_parms.
Fix this up by removing it. Cleans up clang warning message:

net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read

Fixes: 1d8134fea2eb ("net_sched: use idr to allocate basic filter handles")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/sched/cls_basic.c |    1 -
 1 file changed, 1 deletion(-)

--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -196,7 +196,6 @@ static int basic_change(struct net *net,
 	if (err < 0)
 		goto errout;
 
-	err = -EINVAL;
 	if (handle) {
 		fnew->handle = handle;
 		if (!fold) {