From a44c4511ffb2c7387fce6061d20febf75f5399bb Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Wed, 13 Jul 2022 16:18:53 +0200 Subject: net: devlink: fix return statement in devlink_port_new_notify() Return directly without intermediate value store at the end of devlink_port_new_notify() function. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: Jakub Kicinski --- net/core/devlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net') diff --git a/net/core/devlink.c b/net/core/devlink.c index 2f22ce33c3ec..a9776ea923ae 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -1724,8 +1724,7 @@ static int devlink_port_new_notify(struct devlink *devlink, if (err) goto out; - err = genlmsg_reply(msg, info); - return err; + return genlmsg_reply(msg, info); out: nlmsg_free(msg); -- cgit v1.2.3