Skip to content

Commit b1c49d1

Browse files
Colin Ian Kingdavem330
authored andcommitted
net_sched: remove redundant assignment to ret
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: 1d8134f ("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>
1 parent ef739d8 commit b1c49d1

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎net/sched/cls_basic.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
182182
if (err < 0)
183183
goto errout;
184184

185-
err = -EINVAL;
186185
if (handle) {
187186
fnew->handle = handle;
188187
if (!fold) {

0 commit comments

Comments
 (0)