Bluetooth: btusb: Reduce a redundant assignment in btusb_probe()

Initialize @priv_size at declaration rather than separately:
- Simpler: one statement completes both declaration and assignment.
- More flexible: the variable is immediately usable from that point,
  so any new priv_size += can be freely inserted without caring about
  where the separate priv_size = 0 sits.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Zijun Hu
2026-06-25 22:19:56 -07:00
committed by Luiz Augusto von Dentz
parent c3bd57b9be
commit 92db4555c7

View File

@@ -4082,7 +4082,7 @@ static int btusb_probe(struct usb_interface *intf,
struct btusb_data *data;
struct hci_dev *hdev;
unsigned ifnum_base;
int err, priv_size;
int err, priv_size = 0;
BT_DBG("intf %p id %p", intf, id);
@@ -4153,8 +4153,6 @@ static int btusb_probe(struct usb_interface *intf,
init_usb_anchor(&data->ctrl_anchor);
spin_lock_init(&data->rxlock);
priv_size = 0;
data->recv_event = hci_recv_frame;
data->recv_bulk = btusb_recv_bulk;