From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] bluetooth: Add hci_h4p driver
Date: Tue, 23 Dec 2014 13:00:48 +0100 [thread overview]
Message-ID: <20141223120048.GA848@amd> (raw)
In-Reply-To: <D5E3AD8F-9122-49FE-B932-F9DDBB89840F@holtmann.org>
Hi!
> > + /* 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
next prev parent reply other threads:[~2014-12-23 12:00 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 22:37 bluetooth: Add hci_h4p driver Pavel Machek
2014-12-13 23:30 ` Marcel Holtmann
2014-12-13 23:51 ` Pavel Machek
2014-12-14 0:07 ` Marcel Holtmann
2014-12-14 9:47 ` Pavel Machek
2014-12-14 10:40 ` Pavel Machek
2014-12-14 11:16 ` Pavel Machek
2014-12-14 19:21 ` Pavel Machek
2014-12-14 20:28 ` Marcel Holtmann
2014-12-14 22:41 ` Pavel Machek
2014-12-14 21:52 ` Pavel Machek
2014-12-15 10:01 ` Oliver Neukum
2014-12-18 19:31 ` Pavel Machek
2014-12-18 20:10 ` Pavel Machek
2014-12-15 12:10 ` Marcel Holtmann
2014-12-19 9:50 ` Pavel Machek
2014-12-19 9:58 ` Marcel Holtmann
2014-12-20 15:48 ` Pavel Machek
2014-12-20 23:39 ` Marcel Holtmann
2014-12-20 20:23 ` [PATCH] " Pavel Machek
2014-12-20 20:43 ` Paul Bolle
2014-12-20 23:35 ` Marcel Holtmann
2014-12-23 12:00 ` Pavel Machek [this message]
2014-12-23 12:41 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2014-12-23 13:02 Pavel Machek
2015-01-18 12:02 ` Pavel Machek
2015-01-19 21:36 ` Marcel Holtmann
2015-01-20 17:36 ` Pavel Machek
2015-01-20 18:34 ` Marcel Holtmann
2015-01-21 11:01 ` Pavel Machek
2015-01-21 11:46 ` Pali Rohár
2015-01-20 8:28 ` Johan Hedberg
2015-01-20 21:49 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141223120048.GA848@amd \
--to=pavel@ucw.cz \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).