[PATCH BlueZ v1 2/3] android/avctp: remove check in session_browsing_cb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



session->browsing is dereferenced at the beginning of the function, so
the check can be removed.

Found with the SVACE static analysis tool.
---
 android/avctp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/android/avctp.c b/android/avctp.c
index 37b4cec4f..d8104a7c2 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -905,10 +905,8 @@ send:
 failed:
 	DBG("AVCTP Browsing: disconnected");
 
-	if (session->browsing) {
-		avctp_channel_destroy(session->browsing);
-		session->browsing = NULL;
-	}
+	avctp_channel_destroy(session->browsing);
+	session->browsing = NULL;
 
 	return FALSE;
 }
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux