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

Commit f1b29da7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_uac1: free audio device card on USB disconnect"

parents 4e0efe41 adf318a0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * u_uac1.c -- ALSA audio utilities for Gadget stack
 *
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 * Copyright (C) 2008 Bryan Wu <cooloney@kernel.org>
 * Copyright (C) 2008 Analog Devices, Inc
 *
@@ -699,6 +699,7 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}
	snd->card = NULL;

	/* Close PCM playback device and setup substream */
	snd = &gau->playback;
@@ -706,6 +707,7 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}
	snd->card = NULL;

	/* Close PCM capture device and setup substream */
	snd = &gau->capture;
@@ -713,6 +715,7 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}
	snd->card = NULL;

	return 0;
}