Commit 0ad0458c authored by Simon Glass's avatar Simon Glass Committed by Tom Rini

usb: Correct use of debug()

With clang this gives a warning because hubsts appears to be used before
it is set, even if ultimately it is not used. Simplify the code to avoid
this problem.
Signed-off-by: default avatarSimon Glass <[email protected]>
parent 95b41b80
......@@ -625,7 +625,7 @@ static int usb_hub_configure(struct usb_device *dev)
short hubCharacteristics;
struct usb_hub_descriptor *descriptor;
struct usb_hub_device *hub;
__maybe_unused struct usb_hub_status *hubsts;
struct usb_hub_status *hubsts;
int ret;
hub = usb_get_hub_device(dev);
......@@ -779,9 +779,7 @@ static int usb_hub_configure(struct usb_device *dev)
return ret;
#ifdef DEBUG
hubsts = (struct usb_hub_status *)buffer;
debug("get_hub_status returned status %X, change %X\n",
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment