X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fusb_hub.c;h=66b4a725d1b3c1d2caf0fe005fe40e036b9b251f;hb=112db9407dd338f71200beb0fc99dffa8dcb57a8;hp=0f1eab448649541a45e674bcfbd599460cc89677;hpb=0834bb2fb0664e02140cd09fb1e06c0d4c60095a;p=karo-tx-uboot.git diff --git a/common/usb_hub.c b/common/usb_hub.c index 0f1eab4486..66b4a725d1 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -300,7 +300,8 @@ static int usb_hub_configure(struct usb_device *dev) } descriptor = (struct usb_hub_descriptor *)buffer; - length = min(descriptor->bLength, sizeof(struct usb_hub_descriptor)); + length = min_t(int, descriptor->bLength, + sizeof(struct usb_hub_descriptor)); if (usb_get_hub_descriptor(dev, buffer, length) < 0) { debug("usb_hub_configure: failed to get hub " \