From 76198d810dfef5fe9ed10466151d7144886bb3d6 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 3 Feb 2012 00:57:40 -0800 Subject: [PATCH] --- yaml --- r: 293295 b: refs/heads/master c: 97df81873e9c1391319dd818bc4b6856517e4939 h: refs/heads/master i: 293293: d980b96c898662faf1a4d62a88ca6a9b93b374ce 293291: 0207c8fe8065f092fbd8504ec4d5e8257dad6854 293287: 0235717bbd8b2356c5e4c85c7f3c54f4c857fda9 293279: 5ac37ab4bafa6a6e40028c5434a9c8e603df1743 v: v3 --- [refs] | 2 +- trunk/sound/soc/sh/fsi.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 333212271a71..15c2ee691dda 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 180346ede352b12c72c5aeba2fc806fd32880c16 +refs/heads/master: 97df81873e9c1391319dd818bc4b6856517e4939 diff --git a/trunk/sound/soc/sh/fsi.c b/trunk/sound/soc/sh/fsi.c index 8d05e59c8831..1e10184af89a 100644 --- a/trunk/sound/soc/sh/fsi.c +++ b/trunk/sound/soc/sh/fsi.c @@ -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;