[RFC PATCH] USB:XHCI:Adjust the log level of hub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the number of ports of the hub is not between 1 and Maxports,
it will only exit the registration of the hub on the current controller,
but it will not affect the function of the controller itself. Its other
hubs can operate normally, so the log level here can be changed from
error to information.

Signed-off-by: Longfang Liu <liulongfang@xxxxxxxxxx>
---
 drivers/usb/core/hub.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b1e14be..70294ad 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1409,13 +1409,11 @@ static int hub_configure(struct usb_hub *hub,
 		maxchild = min_t(unsigned, maxchild, USB_SS_MAXPORTS);
 
 	if (hub->descriptor->bNbrPorts > maxchild) {
-		message = "hub has too many ports!";
-		ret = -ENODEV;
-		goto fail;
+		dev_info(hub_dev, "hub has too many ports!\n");
+		return -ENODEV;
 	} else if (hub->descriptor->bNbrPorts == 0) {
-		message = "hub doesn't have any ports!";
-		ret = -ENODEV;
-		goto fail;
+		dev_info(hub_dev, "hub doesn't have any ports!\n");
+		return -ENODEV;
 	}
 
 	/*
-- 
2.8.1




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux