From: Nicholas Krause <xerofoify@gmail.com>
To: marcel@holtmann.org
Cc: gustavo@padovan.org, johan.hedberg@gmail.com,
davem@davemloft.net, linux-bluetooth@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] bluetooth:Fix error handling in the function hci_inquiry_cache_update
Date: Wed, 19 Aug 2015 12:36:30 -0400 [thread overview]
Message-ID: <1440002190-24683-1-git-send-email-xerofoify@gmail.com> (raw)
This fixes error handling in the function hci_inquiry_cache_update
for checking if the call to the function hci_remove_oob_data has
failed by returning the error code -ENOENT and if so exit immediately
to the caller of the function hci_inquiry_cache_update by returning
the error code -ENOENT to signal that the call to this function has
failed.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
net/bluetooth/hci_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 2f8fb33..ae1bb3d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1136,7 +1136,8 @@ u32 hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
BT_DBG("cache %p, %pMR", cache, &data->bdaddr);
- hci_remove_remote_oob_data(hdev, &data->bdaddr, BDADDR_BREDR);
+ if (hci_remove_remote_oob_data(hdev, &data->bdaddr, BDADDR_BREDR))
+ return -ENOENT;
if (!data->ssp_mode)
flags |= MGMT_DEV_FOUND_LEGACY_PAIRING;
--
2.1.4
next reply other threads:[~2015-08-19 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 16:36 Nicholas Krause [this message]
2015-08-24 9:58 ` [PATCH] bluetooth:Fix error handling in the function hci_inquiry_cache_update Johan Hedberg
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=1440002190-24683-1-git-send-email-xerofoify@gmail.com \
--to=xerofoify@gmail.com \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@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 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).