aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/connector/cn_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/connector/cn_test.c')
-rw-r--r--Documentation/connector/cn_test.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index 7764594778d4..adcca0368d60 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -69,9 +69,13 @@ static int cn_test_want_notify(void)
69 return -ENOMEM; 69 return -ENOMEM;
70 } 70 }
71 71
72 nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh)); 72 nlh = nlmsg_put(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh), 0);
73 if (!nlh) {
74 kfree_skb(skb);
75 return -EMSGSIZE;
76 }
73 77
74 msg = (struct cn_msg *)NLMSG_DATA(nlh); 78 msg = nlmsg_data(nlh);
75 79
76 memset(msg, 0, size0); 80 memset(msg, 0, size0);
77 81
@@ -117,11 +121,6 @@ static int cn_test_want_notify(void)
117 pr_info("request was sent: group=0x%x\n", ctl->group); 121 pr_info("request was sent: group=0x%x\n", ctl->group);
118 122
119 return 0; 123 return 0;
120
121nlmsg_failure:
122 pr_err("failed to send %u.%u\n", msg->seq, msg->ack);
123 kfree_skb(skb);
124 return -EINVAL;
125} 124}
126#endif 125#endif
127 126