Merge "sound: usb: Add NULL check against udev with uaudio_dev_cleanup() API"

This commit is contained in:
qctecmdr 2020-08-16 18:45:37 -07:00 • committed by Gerrit - the friendly Code Review server
commit b15945be2b

View file

@ -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)