mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "usb: gadget: f_midi: Avoid invalid pointer access"
This commit is contained in:
commit
2e2b090573
1 changed files with 1 additions and 1 deletions
|
|
@ -1235,7 +1235,7 @@ static ssize_t alsa_show(struct device *dev,
|
|||
|
||||
if (fi_midi && fi_midi->f) {
|
||||
midi = func_to_midi(fi_midi->f);
|
||||
if (midi->rmidi && midi->rmidi->card)
|
||||
if (midi->rmidi && midi->card && midi->rmidi->card)
|
||||
return sprintf(buf, "%d %d\n",
|
||||
midi->rmidi->card->number, midi->rmidi->device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue