Thread (25 messages) flat view 25 messages, 5 authors, 2014-12-23

Re: [PATCH] bluetooth: Add hci_h4p driver

From: Pavel Machek <hidden>
Date: 2014-12-23 12:00:53
Also in: linux-arm-kernel, linux-omap, lkml

Hi!
quoted
+	/* We should always send word aligned data to h4+ devices */
+	if (skb->len % 2) {
+		err = skb_pad(skb, 1);
+		if (!err)
+			*skb_put(skb, 1) = 0x00;
+	}
+	if (err)
+		return err;
This is crazy code.

	if (skb->len % 2) {
		if (!skb_pad(skb, 1)
			return -ENOMEM;
		*skb_put(skb, 1) = 0x00;
	}
This does not work, it needs to be if (skb_pad())... and it does not
propagate error value. Took me few boots to debug, as I still can't
scroll back after kernel crash...
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help