tools/btmgmt: add missing return statement
authorChristian Eggers <ceggers@arri.de>
Thu, 25 Aug 2022 20:38:48 +0000 (22:38 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
Leave function on error instead of printing (possibly) invalid flags.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/btmgmt.c

index 94e1c44..70d14ce 100755 (executable)
@@ -2182,7 +2182,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);