lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1306483755-3588-1-git-send-email-sjur.brandeland@stericsson.com>
Date:	Fri, 27 May 2011 10:09:15 +0200
From:	Sjur Brændeland <sjur.brandeland@...ricsson.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>, linux-next@...r.kernel.org,
	balbi@...com, netdev@...r.kernel.org,
	Sjur Brændeland <sjur.brandeland@...ricsson.com>
Subject: [PATCH] caif: Fix compile warning in caif_serial.c

Fix the compile warning introduced by the patch:
"tty: make receive_buf() return the amout of bytes received"

Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricsson.com>
---
Note: Fixes compile issue in linux-next (no issue in net-2.6).

 drivers/net/caif/caif_serial.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 73c7e03..751ebbd 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -191,7 +191,7 @@ static unsigned int ldisc_receive(struct tty_struct *tty,
 		dev_info(&ser->dev->dev,
 			"Bytes received before initial transmission -"
 			"bytes discarded.\n");
-		return;
+		return count;
 	}
 
 	BUG_ON(ser->dev == NULL);
@@ -199,7 +199,7 @@ static unsigned int ldisc_receive(struct tty_struct *tty,
 	/* Get a suitable caif packet and copy in data. */
 	skb = netdev_alloc_skb(ser->dev, count+1);
 	if (skb == NULL)
-		return;
+		return 0;
 	p = skb_put(skb, count);
 	memcpy(p, data, count);
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ