aboutsummaryrefslogtreecommitdiff
path: root/net/caif/cfserl.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-06-02 14:15:10 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-02 14:15:10 +0200
commite4caa8bab3862a7694ab7c6dfede223227ad7fc5 (patch)
tree9fa537a72f00f6b4f86c2da7be2e9554304a8ec4 /net/caif/cfserl.c
parent9f75c1b12c5ef392ddcea575b13560842c28b1b3 (diff)
parentedb39935c8b19fcd9a8f619d0bc1e9d04594cd2b (diff)
Merge branch 'master' of git.alsa-project.org:alsa-kernel into fix/hda
Diffstat (limited to 'net/caif/cfserl.c')
-rw-r--r--net/caif/cfserl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index cb4325a3dc8..965c5baace4 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -59,16 +59,18 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
u8 stx = CFSERL_STX;
int ret;
u16 expectlen = 0;
+
caif_assert(newpkt != NULL);
spin_lock(&layr->sync);
if (layr->incomplete_frm != NULL) {
-
layr->incomplete_frm =
cfpkt_append(layr->incomplete_frm, newpkt, expectlen);
pkt = layr->incomplete_frm;
- if (pkt == NULL)
+ if (pkt == NULL) {
+ spin_unlock(&layr->sync);
return -ENOMEM;
+ }
} else {
pkt = newpkt;
}