diff mbox series

[v2] net: ipv4: remove redundant initialization in inet_rtm_deladdr

Message ID 20201108010541.12432-1-dong.menglong@zte.com.cn
State New
Headers show
Series [v2] net: ipv4: remove redundant initialization in inet_rtm_deladdr | expand

Commit Message

Menglong Dong Nov. 8, 2020, 1:05 a.m. UTC
The initialization for 'err' with '-EINVAL' is redundant and
can be removed, as it is updated soon.

Changes since v1:
- Remove redundant empty line

Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
---
 net/ipv4/devinet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jakub Kicinski Nov. 10, 2020, 11:22 p.m. UTC | #1
On Sun,  8 Nov 2020 09:05:41 +0800 Menglong Dong wrote:
> The initialization for 'err' with '-EINVAL' is redundant and

> can be removed, as it is updated soon.

> 

> Changes since v1:

> - Remove redundant empty line

> 

> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>


Applied, thanks.
diff mbox series

Patch

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 123a6d39438f..43e04382c593 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -650,8 +650,7 @@  static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,
 	struct in_device *in_dev;
 	struct ifaddrmsg *ifm;
 	struct in_ifaddr *ifa;
-
-	int err = -EINVAL;
+	int err;
 
 	ASSERT_RTNL();