From: Christian Eggers <ceggers@arri.de>
To: <linux-bluetooth@vger.kernel.org>
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
Tedd Ho-Jeong An <tedd.an@intel.com>,
Christian Eggers <ceggers@arri.de>
Subject: [PATCH] tools/btmgmt: add missing return statement
Date: Thu, 25 Aug 2022 22:38:48 +0200 [thread overview]
Message-ID: <20220825203848.3499-1-ceggers@arri.de> (raw)
Leave function on error instead of printing (possibly) invalid flags.
Fixes: d70618e49461 ("tools/btmgmt: Add device flags commands")
Signed-off-by: Christian Eggers <ceggers@arri.de>
---
tools/btmgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 42ef9acefaea..132ebb5f5b44 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -2183,7 +2183,7 @@ static void get_flags_rsp(uint8_t status, uint16_t len, const void *param,
if (status != 0) {
error("Get device flags failed with status 0x%02x (%s)",
status, mgmt_errstr(status));
- bt_shell_noninteractive_quit(EXIT_FAILURE);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
}
print("Supported Flags: 0x%08x", rp->supported_flags);
--
2.35.3
next reply other threads:[~2022-08-25 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 20:38 Christian Eggers [this message]
2022-08-25 21:23 ` tools/btmgmt: add missing return statement bluez.test.bot
2022-08-29 20:10 ` [PATCH] " patchwork-bot+bluetooth
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=20220825203848.3499-1-ceggers@arri.de \
--to=ceggers@arri.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.com \
--cc=tedd.an@intel.com \
/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