RE: [PATCH][next] tipc: remove redundant assignment to ret, simplify code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>--- a/net/tipc/socket.c
>+++ b/net/tipc/socket.c
>@@ -3565,11 +3565,8 @@ int tipc_nl_sk_walk(struct sk_buff *skb, struct netlink_callback *cb,
> 	rhashtable_walk_start(iter);
> 	while ((tsk = rhashtable_walk_next(iter)) != NULL) {
> 		if (IS_ERR(tsk)) {
>-			err = PTR_ERR(tsk);
>-			if (err == -EAGAIN) {
>-				err = 0;
>+			if (PTR_ERR(tsk) == -EAGAIN)
> 				continue;
>-			}
> 			break;
> 		}
>
>--
>2.39.2
>
I suggest that err variable should be completely removed. Could you please also do the same thing for this code ?
"
...
err = skb_handler(skb, cb, tsk);
if (err) {
...
}
...
"




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux