View Single Post
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#4
In short, tty_ldisc_ops.receive_buf was changed from void to int (and the return value is used somewhere), but in ppp_async.c, the function was not changed from void.

Code:
--- ppp_async.c.org	2009-12-19 17:45:28.000000000 +0200
+++ ppp_async.c	2009-12-19 14:32:23.000000000 +0200
@@ -346,22 +346,30 @@
  * This can now be called from hard interrupt level as well
  * as soft interrupt level or mainline.
  */
-static void
+static int
 ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
 		  char *cflags, int count)
 {
 	struct asyncppp *ap = ap_get(tty);
 	unsigned long flags;
 
-	if (!ap)
-		return;
+	if (!ap) {
+		return 0;
+	}
 	spin_lock_irqsave(&ap->recv_lock, flags);
 	ppp_async_input(ap, buf, cflags, count);
 	spin_unlock_irqrestore(&ap->recv_lock, flags);
 	if (!skb_queue_empty(&ap->rqueue))
 		tasklet_schedule(&ap->tsk);
 	ap_put(ap);
 	tty_unthrottle(tty);
+	return count;
 }
 
 static void
 

The Following 3 Users Say Thank You to Matan For This Useful Post: