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

Commit 8ef0c01d 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: audio: Don't attempt to close already closed files"

parents 4e854d4e 7751b42a
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -695,18 +695,24 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
	pr_debug("Enter");
	/* Close control device */
	snd = &gau->control;
	if (snd->filp)
	if (snd->filp) {
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}

	/* Close PCM playback device and setup substream */
	snd = &gau->playback;
	if (snd->filp)
	if (snd->filp) {
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}

	/* Close PCM capture device and setup substream */
	snd = &gau->capture;
	if (snd->filp)
	if (snd->filp) {
		filp_close(snd->filp, NULL);
		snd->filp = NULL;
	}

	return 0;
}