2005-02-14 12:01:57

by Guillaume Thouvenin

[permalink] [raw]
Subject: [PATCH 2.6.11-rc3-mm2] drivers/connector/connector.c: remove dead code

This patch removes unreachable code in cn_netlink_send() function.

Signed-off-by: Guillaume Thouvenin <[email protected]>

--- drivers/connector/connector.c.orig 2005-02-14 12:52:32.000000000 +0100
+++ drivers/connector/connector.c 2005-02-14 12:52:44.000000000 +0100
@@ -119,11 +119,6 @@ void cn_netlink_send(struct cn_msg *msg,
netlink_broadcast(dev->nls, skb, 0, groups, GFP_ATOMIC);

return;
-
- nlmsg_failure:
- printk(KERN_ERR "Failed to send %u.%u\n", msg->seq, msg->ack);
- kfree_skb(skb);
- return;
}

static int cn_call_callback(struct cn_msg *msg, void (*destruct_data) (void *), void *data)



2005-02-14 12:25:31

by Guillaume Thouvenin

[permalink] [raw]
Subject: Re: [PATCH 2.6.11-rc3-mm2] drivers/connector/connector.c: remove dead code

On Mon, 2005-02-14 at 13:01 +0100, Guillaume Thouvenin wrote:
> This patch removes unreachable code in cn_netlink_send() function.

The code can be reach via
nlh = NLMSG_PUT(skb, 0, msg->seq, NLMSG_DONE, size - sizeof(*nlh));

So the patch is wrong
Sorry for that

Guillaume