aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_netlink.c')
-rw-r--r--drivers/scsi/scsi_netlink.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c
index 163acf6ad2d3..40579edca101 100644
--- a/drivers/scsi/scsi_netlink.c
+++ b/drivers/scsi/scsi_netlink.c
@@ -64,7 +64,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
64 64
65 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) { 65 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) {
66 err = -EBADMSG; 66 err = -EBADMSG;
67 goto next_msg; 67 return;
68 } 68 }
69 69
70 hdr = NLMSG_DATA(nlh); 70 hdr = NLMSG_DATA(nlh);
@@ -99,27 +99,6 @@ next_msg:
99 99
100 100
101/** 101/**
102 * scsi_nl_rcv_msg -
103 * Receive handler for a socket. Extracts a received message buffer from
104 * the socket, and starts message processing.
105 *
106 * @sk: socket
107 * @len: unused
108 *
109 **/
110static void
111scsi_nl_rcv(struct sock *sk, int len)
112{
113 struct sk_buff *skb;
114
115 while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
116 scsi_nl_rcv_msg(skb);
117 kfree_skb(skb);
118 }
119}
120
121
122/**
123 * scsi_nl_rcv_event - 102 * scsi_nl_rcv_event -
124 * Event handler for a netlink socket. 103 * Event handler for a netlink socket.
125 * 104 *
@@ -168,7 +147,7 @@ scsi_netlink_init(void)
168 } 147 }
169 148
170 scsi_nl_sock = netlink_kernel_create(&init_net, NETLINK_SCSITRANSPORT, 149 scsi_nl_sock = netlink_kernel_create(&init_net, NETLINK_SCSITRANSPORT,
171 SCSI_NL_GRP_CNT, scsi_nl_rcv, NULL, 150 SCSI_NL_GRP_CNT, scsi_nl_rcv_msg, NULL,
172 THIS_MODULE); 151 THIS_MODULE);
173 if (!scsi_nl_sock) { 152 if (!scsi_nl_sock) {
174 printk(KERN_ERR "%s: register of recieve handler failed\n", 153 printk(KERN_ERR "%s: register of recieve handler failed\n",