mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2][next] Bluetooth: btintel_pcie: Remove structually deadcode
@ 2024-10-15  4:58 Everest K.C.
  2024-10-15  9:48 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Everest K.C. @ 2024-10-15  4:58 UTC (permalink / raw)
  To: marcel, luiz.dentz
  Cc: Everest K.C., skhan, kernel-janitors, linux-bluetooth, linux-kernel

The switch case statement has a default branch. Thus, the return
statement at the end of the function can never be reached.
Fix it by removing the return statement at the end of the
function.
The intel bluetooth module was successfully built after the change
without any errors.

This issue was reported by Coverity Scan.
https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709

Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
---
V1 -> V2: - Changed "Fixing" to "Fix" in the changelog
          - Added that the change was successfully built
          - Added kernel-janitors mailing list to CC
 
 drivers/bluetooth/btintel_pcie.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index e4ae8c898dfd..660496e55276 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -391,7 +391,6 @@ static inline char *btintel_pcie_alivectxt_state2str(u32 alive_intr_ctxt)
 	default:
 		return "unknown";
 	}
-	return "null";
 }
 
 /* This function handles the MSI-X interrupt for gp0 cause (bit 0 in
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-15 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-15  4:58 [PATCH V2][next] Bluetooth: btintel_pcie: Remove structually deadcode Everest K.C.
2024-10-15  9:48 ` Dan Carpenter
2024-10-15 16:01   ` Shuah Khan
2024-10-15 16:08     ` Everest K.C.
2024-10-15 16:10       ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®