aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-07 22:05:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-07 22:05:34 -0500
commiteee8abe5de9cbd936b51db292c8d3c406b0e79e7 (patch)
treeeec36145a50ab08e85f45107b9ed15a1bc83535f /drivers
parent06aa5b4aae223ea4d623dc68e85466174bb92c84 (diff)
parentde79059ecd7cd650f3788ece978a64586921d1f1 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [BRIDGE]: adding new device to bridge should enable if up [IPV6]: Do not set IF_READY if device is down [IPSEC]: xfrm audit hook misplaced in pfkey_delete and xfrm_del_sa [IPSEC]: Add xfrm policy change auditing to pfkey_spdget [IPSEC]: xfrm_policy delete security check misplaced [CONNECTOR]: Bugfix for cn_call_callback() [DCCP]: Revert patch which disables bidirectional mode [IPV6]: Handle np->opt being NULL in ipv6_getsockopt_sticky(). [UDP]: Reread uh pointer after pskb_trim [NETFILTER]: nfnetlink_log: fix crash on bridged packet [NETFILTER]: nfnetlink_log: zero-terminate prefix [NETFILTER]: nf_conntrack_ipv6: fix incorrect classification of IPv6 fragments as ESTABLISHED
Diffstat (limited to 'drivers')
-rw-r--r--drivers/connector/connector.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index a44db75bc25b..a905f7820331 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -128,7 +128,7 @@ EXPORT_SYMBOL_GPL(cn_netlink_send);
128 */ 128 */
129static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), void *data) 129static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), void *data)
130{ 130{
131 struct cn_callback_entry *__cbq; 131 struct cn_callback_entry *__cbq, *__new_cbq;
132 struct cn_dev *dev = &cdev; 132 struct cn_dev *dev = &cdev;
133 int err = -ENODEV; 133 int err = -ENODEV;
134 134
@@ -148,27 +148,27 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v
148 } else { 148 } else {
149 struct cn_callback_data *d; 149 struct cn_callback_data *d;
150 150
151 __cbq = kzalloc(sizeof(*__cbq), GFP_ATOMIC); 151 err = -ENOMEM;
152 if (__cbq) { 152 __new_cbq = kzalloc(sizeof(struct cn_callback_entry), GFP_ATOMIC);
153 d = &__cbq->data; 153 if (__new_cbq) {
154 d = &__new_cbq->data;
154 d->callback_priv = msg; 155 d->callback_priv = msg;
155 d->callback = __cbq->data.callback; 156 d->callback = __cbq->data.callback;
156 d->ddata = data; 157 d->ddata = data;
157 d->destruct_data = destruct_data; 158 d->destruct_data = destruct_data;
158 d->free = __cbq; 159 d->free = __new_cbq;
159 160
160 INIT_WORK(&__cbq->work, 161 INIT_WORK(&__new_cbq->work,
161 &cn_queue_wrapper); 162 &cn_queue_wrapper);
162 163
163 if (queue_work(dev->cbdev->cn_queue, 164 if (queue_work(dev->cbdev->cn_queue,
164 &__cbq->work)) 165 &__new_cbq->work))
165 err = 0; 166 err = 0;
166 else { 167 else {
167 kfree(__cbq); 168 kfree(__new_cbq);
168 err = -EINVAL; 169 err = -EINVAL;
169 } 170 }
170 } else 171 }
171 err = -ENOMEM;
172 } 172 }
173 break; 173 break;
174 } 174 }