mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "sound: usb: Add NULL check against udev with uaudio_dev_cleanup() API"
This commit is contained in:
commit
b15945be2b
1 changed files with 5 additions and 0 deletions
|
|
@ -860,6 +860,11 @@ static void uaudio_dev_cleanup(struct uaudio_dev *dev)
|
|||
{
|
||||
int if_idx;
|
||||
|
||||
if (!dev->udev) {
|
||||
uaudio_dbg("USB audio device memory is already freed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* free xfer buffer and unmap xfer ring and buf per interface */
|
||||
for (if_idx = 0; if_idx < dev->num_intf; if_idx++) {
|
||||
if (!dev->info[if_idx].in_use)
|
||||
|
|
|
|||
Loading…
Reference in a new issue