From: Johan Hedberg <johan.hedberg@gmail.com>
To: Andre Guedes <andre.guedes@openbossa.org>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/4] Bluetooth: HCI request error handling
Date: Thu, 7 Mar 2013 09:19:53 +0200 [thread overview]
Message-ID: <20130307071953.GA28958@x220> (raw)
In-Reply-To: <20130307071527.GB28536@x220>
Hi,
On Thu, Mar 07, 2013, Johan Hedberg wrote:
> > @@ -2533,6 +2543,7 @@ int hci_req_add(struct hci_request *req, u16 opcode, u32 plen, void *param)
> > skb = hci_prepare_cmd(hdev, opcode, plen, param);
> > if (!skb) {
> > BT_ERR("%s no memory for command", hdev->name);
> > + req->error = true;
> > return -ENOMEM;
> > }
>
> If the error is already set then I don't think hci_req_add should even
> be attempting to add another command to the queue. So you should be
> checking for a set error early in the function and just return if it's
> set.
Nevermind. I saw that you have this in the last patch of this set. You
could probably merge that into this patch though.
Johan
next prev parent reply other threads:[~2013-03-07 7:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 23:45 [PATCH 0/4] Error handling in HCI request framework Andre Guedes
2013-03-06 23:45 ` [PATCH 1/4] Bluetooth: Check hci_req_run error code in __hci_req_sync Andre Guedes
2013-03-07 7:11 ` Johan Hedberg
2013-03-07 16:37 ` Andre Guedes
2013-03-06 23:45 ` [PATCH 2/4] Bluetooth: HCI request error handling Andre Guedes
2013-03-07 7:15 ` Johan Hedberg
2013-03-07 7:19 ` Johan Hedberg [this message]
2013-03-07 16:38 ` Andre Guedes
2013-03-07 16:38 ` Andre Guedes
2013-03-06 23:45 ` [PATCH 3/4] Bluetooth: Make hci_req_add return void Andre Guedes
2013-03-06 23:45 ` [PATCH 4/4] Bluetooth: Check req->error flag in hci_req_add Andre Guedes
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=20130307071953.GA28958@x220 \
--to=johan.hedberg@gmail.com \
--cc=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.