Lines Matching +full:2 +full:d

28 	const struct uac1_ac_header_descriptor *d = p;  in validate_uac1_header()  local
30 return d->bLength >= sizeof(*d) && in validate_uac1_header()
31 d->bLength >= sizeof(*d) + d->bInCollection; in validate_uac1_header()
38 const struct uac_mixer_unit_descriptor *d = p; in validate_mixer_unit() local
41 if (d->bLength < sizeof(*d) || !d->bNrInPins) in validate_mixer_unit()
43 len = sizeof(*d) + d->bNrInPins; in validate_mixer_unit()
51 len += 2 + 1; /* wChannelConfig, iChannelNames */ in validate_mixer_unit()
61 len += 2; /* wClusterDescrID */ in validate_mixer_unit()
65 return d->bLength >= len; in validate_mixer_unit()
72 const struct uac_processing_unit_descriptor *d = p; in validate_processing_unit() local
76 if (d->bLength < sizeof(*d)) in validate_processing_unit()
78 len = sizeof(*d) + d->bNrInPins; in validate_processing_unit()
79 if (d->bLength < len) in validate_processing_unit()
85 len += 1 + 2 + 1; in validate_processing_unit()
86 if (d->bLength < len + 1) /* bControlSize */ in validate_processing_unit()
95 len += 2; /* bmControls -- 2 bytes for PU */ in validate_processing_unit()
102 len += 2 + 4; in validate_processing_unit()
105 if (d->bLength < len) in validate_processing_unit()
113 switch (le16_to_cpu(d->wProcessType)) { in validate_processing_unit()
116 if (d->bLength < len + 1) /* bNrModes */ in validate_processing_unit()
119 len += 1 + m * 2; /* bNrModes, waModes(n) */ in validate_processing_unit()
128 switch (le16_to_cpu(d->wProcessType)) { in validate_processing_unit()
131 if (d->bLength < len + 1) /* bNrModes */ in validate_processing_unit()
142 len += 2; /* wClusterDescrID */ in validate_processing_unit()
145 switch (le16_to_cpu(d->wProcessType)) { in validate_processing_unit()
147 if (d->bLength < len + 1) /* bNrModes */ in validate_processing_unit()
150 len += 1 + m * 2; /* bNrModes, waClusterDescrID(n) */ in validate_processing_unit()
153 len += 2 + 4; /* wClusterDescrID, bmAlgorighms */ in validate_processing_unit()
160 if (d->bLength < len) in validate_processing_unit()
170 const struct uac_selector_unit_descriptor *d = p; in validate_selector_unit() local
173 if (d->bLength < sizeof(*d)) in validate_selector_unit()
175 len = sizeof(*d) + d->bNrInPins; in validate_selector_unit()
185 len += 4 + 2; /* bmControls, wSelectorDescrStr */ in validate_selector_unit()
188 return d->bLength >= len; in validate_selector_unit()
194 const struct uac_feature_unit_descriptor *d = p; in validate_uac1_feature_unit() local
196 if (d->bLength < sizeof(*d) || !d->bControlSize) in validate_uac1_feature_unit()
199 return d->bLength >= sizeof(*d) + d->bControlSize + 1; in validate_uac1_feature_unit()
205 const struct uac2_feature_unit_descriptor *d = p; in validate_uac2_feature_unit() local
207 if (d->bLength < sizeof(*d)) in validate_uac2_feature_unit()
210 return d->bLength >= sizeof(*d) + 4 + 1; in validate_uac2_feature_unit()
216 const struct uac3_feature_unit_descriptor *d = p; in validate_uac3_feature_unit() local
218 if (d->bLength < sizeof(*d)) in validate_uac3_feature_unit()
221 return d->bLength >= sizeof(*d) + 4 + 2; in validate_uac3_feature_unit()
227 const struct usb_midi_out_jack_descriptor *d = p; in validate_midi_out_jack() local
229 return d->bLength >= sizeof(*d) && in validate_midi_out_jack()
230 d->bLength >= sizeof(*d) + d->bNrInputPins * 2; in validate_midi_out_jack()
310 if (v->type == hdr[2] && in validate_desc()