[PATCH 5.10 435/462] usb: gadget: Check bmAttributes only if configuration is valid