diff mbox series

[BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read()

Message ID 20240702122717.77746-1-r.smirnov@omp.ru (mailing list archive)
State Accepted
Commit 537f96a28399ad9a4140801575b384c8c5716bba
Headers show
Series [BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read() | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 1: T1 Title exceeds max length (89>80): "[BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read()"
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Roman Smirnov July 2, 2024, 12:27 p.m. UTC
It is necessary to add a return value check.

Found with the SVACE static analysis tool.
---
 client/player.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

bluez.test.bot@gmail.com July 2, 2024, 2:23 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=867534

---Test result---

Test Summary:
CheckPatch                    PASS      0.63 seconds
GitLint                       FAIL      0.57 seconds
BuildEll                      PASS      25.82 seconds
BluezMake                     PASS      1808.41 seconds
MakeCheck                     PASS      13.61 seconds
MakeDistcheck                 PASS      186.19 seconds
CheckValgrind                 PASS      259.70 seconds
CheckSmatch                   PASS      365.23 seconds
bluezmakeextell               PASS      126.11 seconds
IncrementalBuild              PASS      1566.74 seconds
ScanBuild                     PASS      1063.75 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read()

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (89>80): "[BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read()"


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org July 3, 2024, 3:10 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 2 Jul 2024 15:27:17 +0300 you wrote:
> It is necessary to add a return value check.
> 
> Found with the SVACE static analysis tool.
> ---
>  client/player.c | 5 +++++
>  1 file changed, 5 insertions(+)

Here is the summary with links:
  - [BlueZ,v1] client/player: add return value check of io_get_fd() to transport_timer_read()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=537f96a28399

You are awesome, thank you!
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index 7a7598c39..0d031e4b0 100644
--- a/client/player.c
+++ b/client/player.c
@@ -5016,6 +5016,11 @@  static bool transport_timer_read(struct io *io, void *user_data)
 		return false;
 
 	fd = io_get_fd(io);
+	if (fd < 0) {
+		bt_shell_printf("io_get_fd() returned %d\n", fd);
+		return false;
+	}
+
 	ret = read(fd, &exp, sizeof(exp));
 	if (ret < 0) {
 		bt_shell_printf("Failed to read: %s (%d)\n", strerror(errno),