diff mbox series

usb: hub: make wait_for_connected() take an int instead of a pointer to int

Message ID 20211210142028.GB18906@kili (mailing list archive)
State Accepted
Commit b8f1ba99cea540903154d34888d7d310cc54ea4f
Headers show
Series usb: hub: make wait_for_connected() take an int instead of a pointer to int | expand

Commit Message

Dan Carpenter Dec. 10, 2021, 2:20 p.m. UTC
The wait_for_connected() function doesn't modify "*port1" and there is
no need to pass a pointer.  Just pass the int itself.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/usb/core/hub.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 00070a8a6507..0e1fdde88905 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3570,7 +3570,7 @@  static int finish_port_resume(struct usb_device *udev)
  * This routine should only be called when persist is enabled.
  */
 static int wait_for_connected(struct usb_device *udev,
-		struct usb_hub *hub, int *port1,
+		struct usb_hub *hub, int port1,
 		u16 *portchange, u16 *portstatus)
 {
 	int status = 0, delay_ms = 0;
@@ -3584,7 +3584,7 @@  static int wait_for_connected(struct usb_device *udev,
 		}
 		msleep(20);
 		delay_ms += 20;
-		status = hub_port_status(hub, *port1, portstatus, portchange);
+		status = hub_port_status(hub, port1, portstatus, portchange);
 	}
 	dev_dbg(&udev->dev, "Waited %dms for CONNECT\n", delay_ms);
 	return status;
@@ -3690,7 +3690,7 @@  int usb_port_resume(struct usb_device *udev, pm_message_t msg)
 	}
 
 	if (udev->persist_enabled)
-		status = wait_for_connected(udev, hub, &port1, &portchange,
+		status = wait_for_connected(udev, hub, port1, &portchange,
 				&portstatus);
 
 	status = check_port_resume_type(udev,