]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Connector: Correctly set the error code in case of success when dispatching receive...
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 17 May 2011 22:25:38 +0000 (15:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 Jul 2011 06:15:07 +0000 (23:15 -0700)
commit 663dd6dcaf7e95526e469e91f41972a9c0cca30c upstream.

The recent changes to the connector code introduced this bug where even
when a callback was invoked, we would return an error resulting in
double freeing of the skb. This patch fixes this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/connector/connector.c

index 219d88a0eeae07c1e963c4997f6894fe79046d2a..dde6a0fad4087fa6225670b2a1393fb03cec0041 100644 (file)
@@ -139,6 +139,7 @@ static int cn_call_callback(struct sk_buff *skb)
        spin_unlock_bh(&dev->cbdev->queue_lock);
 
        if (cbq != NULL) {
+               err = 0;
                cbq->callback(msg, nsp);
                kfree_skb(skb);
                cn_queue_release_callback(cbq);