Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47949bc

Browse files
tiwaigregkh
authored andcommitted
usb: gadget: midi2: Fix missing UMP group attributes initialization
commit 21d8525 upstream. The gadget card driver forgot to call snd_ump_update_group_attrs() after adding FBs, and this leaves the UMP group attributes uninitialized. As a result, -ENODEV error is returned at opening a legacy rawmidi device as an inactive group. This patch adds the missing call to address the behavior above. Fixes: 8b64592 ("usb: gadget: Add support for USB MIDI 2.0 function driver") Cc: stable <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent edfa1f2 commit 47949bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/function/f_midi2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,7 @@ static int f_midi2_create_card(struct f_midi2 *midi2)
16011601
strscpy(fb->info.name, ump_fb_name(b),
16021602
sizeof(fb->info.name));
16031603
}
1604+
snd_ump_update_group_attrs(ump);
16041605
}
16051606

16061607
for (i = 0; i < midi2->num_eps; i++) {

0 commit comments

Comments
 (0)