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

Commit 97df8187 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: fsi: fsi_stream_is_working() care substream->runtime

parent 180346ed
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ static int fsi_stream_is_working(struct fsi_priv *fsi,
	int ret;

	spin_lock_irqsave(&master->lock, flags);
	ret = !!io->substream;
	ret = !!(io->substream && io->substream->runtime);
	spin_unlock_irqrestore(&master->lock, flags);

	return ret;
@@ -756,9 +756,7 @@ static int fsi_pio_transfer(struct fsi_priv *fsi, struct fsi_stream *io,
	u8 *buf;
	int over_period;

	if (!fsi			||
	    !io->substream		||
	    !io->substream->runtime)
	if (!fsi_stream_is_working(fsi, io))
		return -EINVAL;

	over_period	= 0;