[PATCH can-next 03/10] can: gs_usb: gs_make_candev(): reduce scope of variable bt_const_extended

From: Marc Kleine-Budde

Date: Sat Oct 03 2026 - 18:54:15 EST


To improve readability of the code, reduce the scope of the variable
bt_const_extended.

Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
drivers/net/can/usb/gs_usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 5e96c1a7e5cc..b0e7202f0fc0 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -1305,7 +1305,6 @@ static struct gs_can *gs_make_candev(unsigned int channel,
struct gs_can *dev;
struct net_device *netdev;
int rc;
- struct gs_device_bt_const_extended bt_const_extended;
struct gs_device_bt_const bt_const;
u32 feature;

@@ -1445,6 +1444,8 @@ static struct gs_can *gs_make_candev(unsigned int channel,
*/
if (feature & GS_CAN_FEATURE_FD &&
feature & GS_CAN_FEATURE_BT_CONST_EXT) {
+ struct gs_device_bt_const_extended bt_const_extended;
+
rc = usb_control_msg_recv(interface_to_usbdev(intf), 0,
GS_USB_BREQ_BT_CONST_EXT,
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,

--
2.53.0