File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
drivers/usb/gadget/function Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ struct f_midi {
99
99
unsigned int in_last_port ;
100
100
unsigned char free_ref ;
101
101
102
- struct gmidi_in_port in_ports_array [/* in_ports */ ] ;
102
+ struct gmidi_in_port in_ports_array [] __counted_by ( in_ports ) ;
103
103
};
104
104
105
105
static inline struct f_midi * func_to_midi (struct usb_function * f )
@@ -1349,6 +1349,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
1349
1349
status = - ENOMEM ;
1350
1350
goto setup_fail ;
1351
1351
}
1352
+ midi -> in_ports = opts -> in_ports ;
1352
1353
1353
1354
for (i = 0 ; i < opts -> in_ports ; i ++ )
1354
1355
midi -> in_ports_array [i ].cable = i ;
@@ -1359,7 +1360,6 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
1359
1360
status = - ENOMEM ;
1360
1361
goto midi_free ;
1361
1362
}
1362
- midi -> in_ports = opts -> in_ports ;
1363
1363
midi -> out_ports = opts -> out_ports ;
1364
1364
midi -> index = opts -> index ;
1365
1365
midi -> buflen = opts -> buflen ;
You can’t perform that action at this time.
0 commit comments