Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH][net-next] devlink: use direct return of genlmsg_reply
@ 2019-02-11 11:09 Li RongQing
  2019-02-12 17:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2019-02-11 11:09 UTC (permalink / raw)
  To: netdev

This can remove redundant check

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/core/devlink.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index e6a015b8ac9b..76a9d287dbec 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -4355,11 +4355,8 @@ static int devlink_fmsg_snd(struct devlink_fmsg *fmsg,
 		err = -EMSGSIZE;
 		goto nla_put_failure;
 	}
-	err = genlmsg_reply(skb, info);
-	if (err)
-		return err;
 
-	return 0;
+	return genlmsg_reply(skb, info);
 
 nla_put_failure:
 	nlmsg_free(skb);
-- 
2.16.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][net-next] devlink: use direct return of genlmsg_reply
  2019-02-11 11:09 [PATCH][net-next] devlink: use direct return of genlmsg_reply Li RongQing
@ 2019-02-12 17:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-02-12 17:34 UTC (permalink / raw)
  To: lirongqing; +Cc: netdev

From: Li RongQing <lirongqing@baidu.com>
Date: Mon, 11 Feb 2019 19:09:07 +0800

> This can remove redundant check
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 11:09 [PATCH][net-next] devlink: use direct return of genlmsg_reply Li RongQing
2019-02-12 17:34 ` David Miller

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org netdev@archiver.kernel.org
	public-inbox-index netdev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox