summaryrefslogtreecommitdiffstats
path: root/audio/sink.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-13 21:16:55 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-13 21:16:55 +0000
commitca36a9c81adc2d7c0b0d8ddaa3e0e582991c1ca3 (patch)
tree6d423052bb1b4a90b35caa7425eef3a448b033bf /audio/sink.c
parentab81dc1b10048188c2005dc29bbdb45f42c10c95 (diff)
Fix error checking order in sink_get_config
Diffstat (limited to 'audio/sink.c')
-rw-r--r--audio/sink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/sink.c b/audio/sink.c
index 64d0a27d..0020a7ce 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -369,14 +369,14 @@ int sink_get_config(struct device *dev, int sock, struct ipc_packet *req,
int err;
struct pending_connect *c = NULL;
+ if (sink->state == AVDTP_STATE_STREAMING)
+ goto proceed;
+
if (sink->c) {
error("sink_get_config: another request already in progress");
return -EBUSY;
}
- if (sink->state == AVDTP_STATE_STREAMING)
- goto proceed;
-
if (!sink->session)
sink->session = avdtp_get(&dev->src, &dev->dst);