From: "Gustavo F. Padovan" <gustavo@padovan.org>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org
Subject: Re: [PATCH] Bluetooth: Fix return value when bt_skb_alloc fails
Date: Thu, 22 Apr 2010 03:54:01 -0300 [thread overview]
Message-ID: <20100422065401.GF22959@vigoh> (raw)
In-Reply-To: <1271917230-30439-1-git-send-email-gustavo@padovan.org>
Hi Marcel,
* Gustavo F. Padovan <gustavo@padovan.org> [2010-04-22 03:20:30 -0300]:
> From: Gustavo F. Padovan <padovan@profusion.mobi>
>
> Set the proper error(ENOMEM), instead of just return 0.
>
> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> ---
> drivers/bluetooth/hci_h4.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
> index c0ce813..3f038f5 100644
> --- a/drivers/bluetooth/hci_h4.c
> +++ b/drivers/bluetooth/hci_h4.c
> @@ -246,7 +246,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
> BT_ERR("Can't allocate mem for new packet");
> h4->rx_state = H4_W4_PACKET_TYPE;
> h4->rx_count = 0;
> - return 0;
> + return -ENOMEM;
> }
>
> h4->rx_skb->dev = (void *) hu->hdev;
> --
> 1.7.0.4
>
Ignore this one, I have found a similar issue in other file, just sent
the new fix to the list.
--
Gustavo F. Padovan
http://padovan.org
prev parent reply other threads:[~2010-04-22 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 6:20 [PATCH] Bluetooth: Fix return value when bt_skb_alloc fails Gustavo F. Padovan
2010-04-22 6:54 ` Gustavo F. Padovan [this message]
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=20100422065401.GF22959@vigoh \
--to=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).