]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btbcm: remove done label in btbcm_patchram
authorDongyang Jin <jindongyang@kylinos.cn>
Tue, 3 Feb 2026 07:10:48 +0000 (15:10 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 10 Apr 2026 14:20:22 +0000 (10:20 -0400)
There is no point in having the label since all it does is return the
value in the 'err' variable. Instead make every goto return directly
and remove the label.

Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btbcm.c

index d33cc70eec66206a0455d490da9598232e619bd7..dccfbeee4721976702cd97989ea336b8fd367033 100644 (file)
@@ -223,7 +223,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);
 
@@ -242,8 +242,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;
@@ -258,7 +257,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);
        }
@@ -266,8 +265,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
        /* 250 msec delay after Launch Ram completes */
        msleep(250);
 
-done:
-       return err;
+       return 0;
 }
 EXPORT_SYMBOL(btbcm_patchram);