diff mbox series

bluetooth/btbcm: Remove goto in btbcm_patchram function

Message ID 20220823034110.8295-1-zhoujie@nfschina.com (mailing list archive)
State New, archived
Headers show
Series bluetooth/btbcm: Remove goto in btbcm_patchram function | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix fail "Bluetooth: " is not specified in the subject
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

ZhouJie Aug. 23, 2022, 3:41 a.m. UTC
Remove the goto statement in the btbcm_patchram function to optimize
program execution efficiency.

Signed-off-by: Zhou jie <zhoujie@nfschina.com>
---
 drivers/bluetooth/btbcm.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 23, 2022, 5:25 a.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=669998

---Test result---

Test Summary:
CheckPatch                    PASS      1.73 seconds
GitLint                       PASS      0.99 seconds
SubjectPrefix                 FAIL      0.87 seconds
BuildKernel                   PASS      34.20 seconds
BuildKernel32                 PASS      29.57 seconds
Incremental Build with patchesPASS      43.12 seconds
TestRunner: Setup             PASS      495.12 seconds
TestRunner: l2cap-tester      PASS      17.51 seconds
TestRunner: bnep-tester       PASS      6.77 seconds
TestRunner: mgmt-tester       PASS      104.44 seconds
TestRunner: rfcomm-tester     PASS      10.22 seconds
TestRunner: sco-tester        PASS      10.08 seconds
TestRunner: smp-tester        PASS      9.97 seconds
TestRunner: userchan-tester   PASS      7.01 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.87 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index d9ceca7a7935..60827593ba36 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -175,7 +175,7 @@  int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
 		err = PTR_ERR(skb);
 		bt_dev_err(hdev, "BCM: Download Minidrv command failed (%d)",
 			   err);
-		goto done;
+		return err;
 	}
 	kfree_skb(skb);
 
@@ -194,8 +194,7 @@  int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
 
 		if (fw_size < cmd->plen) {
 			bt_dev_err(hdev, "BCM: Patch is corrupted");
-			err = -EINVAL;
-			goto done;
+			return -EINVAL;
 		}
 
 		cmd_param = fw_ptr;
@@ -210,7 +209,7 @@  int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
 			err = PTR_ERR(skb);
 			bt_dev_err(hdev, "BCM: Patch command %04x failed (%d)",
 				   opcode, err);
-			goto done;
+			return err;
 		}
 		kfree_skb(skb);
 	}
@@ -218,7 +217,6 @@  int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
 	/* 250 msec delay after Launch Ram completes */
 	msleep(250);
 
-done:
 	return err;
 }
 EXPORT_SYMBOL(btbcm_patchram);