Commit 95c47128 authored by Pratham Pratap's avatar Pratham Pratap Committed by Greg Kroah-Hartman
Browse files

ANDROID: usb: gadget: f_midi: Avoid invalid pointer access



Currently f_midi function driver is marking the f_midi->card
NULL when the card is unregistered. There is a possibility that
alsa_show is called after the card is unregistered which can lead
to page fault since midi->card is assigned to rmidi->card. Avoid
this by adding midi->card pointer check in alsa_show.

Fixes: 14948a5a ("ANDROID: usb: gadget: f_midi: create F_midi device")
Change-Id: I24fd35fb9cd35fcd5d8698b808459310b09675f9
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 62e32cf8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment