projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a206f9
)
net: dcb: Return the correct errno code
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Tue, 1 Jun 2021 14:13:58 +0000
(22:13 +0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 2 Jun 2021 00:01:33 +0000
(17:01 -0700)
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c
patch
|
blob
|
history
diff --git
a/net/dcb/dcbnl.c
b/net/dcb/dcbnl.c
index
51f80a2
..
b441ab3
100644
(file)
--- a/
net/dcb/dcbnl.c
+++ b/
net/dcb/dcbnl.c
@@
-1381,7
+1381,7
@@
static int dcbnl_notify(struct net_device *dev, int event, int cmd,
skb = dcbnl_newmsg(event, cmd, portid, seq, 0, &nlh);
if (!skb)
- return -ENO
BUFS
;
+ return -ENO
MEM
;
if (dcbx_ver == DCB_CAP_DCBX_VER_IEEE)
err = dcbnl_ieee_fill(skb, dev);
@@
-1781,7
+1781,7
@@
static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
reply_skb = dcbnl_newmsg(fn->type, dcb->cmd, portid, nlh->nlmsg_seq,
nlh->nlmsg_flags, &reply_nlh);
if (!reply_skb)
- return -ENO
BUFS
;
+ return -ENO
MEM
;
ret = fn->cb(netdev, nlh, nlh->nlmsg_seq, tb, reply_skb);
if (ret < 0) {