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

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

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 180346ed
...@@ -450,7 +450,7 @@ static int fsi_stream_is_working(struct fsi_priv *fsi, ...@@ -450,7 +450,7 @@ static int fsi_stream_is_working(struct fsi_priv *fsi,
int ret; int ret;
spin_lock_irqsave(&master->lock, flags); spin_lock_irqsave(&master->lock, flags);
ret = !!io->substream; ret = !!(io->substream && io->substream->runtime);
spin_unlock_irqrestore(&master->lock, flags); spin_unlock_irqrestore(&master->lock, flags);
return ret; return ret;
...@@ -756,9 +756,7 @@ static int fsi_pio_transfer(struct fsi_priv *fsi, struct fsi_stream *io, ...@@ -756,9 +756,7 @@ static int fsi_pio_transfer(struct fsi_priv *fsi, struct fsi_stream *io,
u8 *buf; u8 *buf;
int over_period; int over_period;
if (!fsi || if (!fsi_stream_is_working(fsi, io))
!io->substream ||
!io->substream->runtime)
return -EINVAL; return -EINVAL;
over_period = 0; over_period = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment