Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b15945be authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 25e96b14 8beb58f7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)