Skip to content

Commit fde55ea

Browse files
lrq-maxdavem330
authored andcommitted
devlink: use direct return of genlmsg_reply
This can remove redundant check Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1d9b041 commit fde55ea

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/core/devlink.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4356,11 +4356,8 @@ static int devlink_fmsg_snd(struct devlink_fmsg *fmsg,
43564356
err = -EMSGSIZE;
43574357
goto nla_put_failure;
43584358
}
4359-
err = genlmsg_reply(skb, info);
4360-
if (err)
4361-
return err;
43624359

4363-
return 0;
4360+
return genlmsg_reply(skb, info);
43644361

43654362
nla_put_failure:
43664363
nlmsg_free(skb);

0 commit comments

Comments
 (0)