[PATCH v3 5/5] can: gs_usb.c: skip new variable declaration

From: Alexander Kozhinov
Date: Tue Oct 08 2024 - 15:43:10 EST


This change implements nipick: no need to declare a new variable for host_iface which is used
only once.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@xxxxxxxxx>
---
drivers/net/can/usb/gs_usb.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 24f715f9c436..d93410682d4b 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -1413,7 +1413,6 @@ static int gs_usb_probe(struct usb_interface *intf,
{
struct usb_device *udev = interface_to_usbdev(intf);
struct usb_endpoint_descriptor *ep_in, *ep_out;
- struct usb_host_interface *host_iface;
struct gs_host_frame *hf;
struct gs_usb *parent;
struct gs_host_config hconf = {
@@ -1423,10 +1422,9 @@ static int gs_usb_probe(struct usb_interface *intf,
unsigned int icount, i;
int rc;

- host_iface = intf->cur_altsetting;
-
/* Find common bulk endpoints reverse */
- rc = usb_find_common_endpoints(host_iface, &ep_in, &ep_out, NULL, NULL);
+ rc = usb_find_common_endpoints(intf->cur_altsetting,
+ &ep_in, &ep_out, NULL, NULL);
if (rc) {
dev_err(&intf->dev, "Required endpoints not found\n");
return rc;
--
2.43.0