From fb362158edd56bac4363d5cc4c9437d49e62012d Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 30 Jan 2010 15:50:51 -0300 Subject: [PATCH] --- yaml --- r: 181613 b: refs/heads/master c: 831f476cee704c37e7f96510135a90dfec6d00e9 h: refs/heads/master i: 181611: 1f7443736cc867c7a7e8c82f586730e3bbcffe7d v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx18/cx18-alsa-pcm.c | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 764dbfd896eb..88e3833681e4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b4729dcbba5431bf636d3d6615709383ad5e0d34 +refs/heads/master: 831f476cee704c37e7f96510135a90dfec6d00e9 diff --git a/trunk/drivers/media/video/cx18/cx18-alsa-pcm.c b/trunk/drivers/media/video/cx18/cx18-alsa-pcm.c index 06862a69c7b0..cfa512112ca0 100644 --- a/trunk/drivers/media/video/cx18/cx18-alsa-pcm.c +++ b/trunk/drivers/media/video/cx18/cx18-alsa-pcm.c @@ -152,28 +152,20 @@ static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream) struct v4l2_device *v4l2_dev = cxsc->v4l2_dev; struct cx18 *cx = to_cx18(v4l2_dev); struct cx18_stream *s; - struct cx18_open_id *item; + struct cx18_open_id item; int ret; /* Instruct the cx18 to start sending packets */ snd_cx18_lock(cxsc); s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM]; - /* Allocate memory */ - item = kmalloc(sizeof(struct cx18_open_id), GFP_KERNEL); - if (NULL == item) { - snd_cx18_unlock(cxsc); - return -ENOMEM; - } - - item->cx = cx; - item->type = s->type; - item->open_id = cx->open_id++; + item.cx = cx; + item.type = s->type; + item.open_id = cx->open_id++; /* See if the stream is available */ - if (cx18_claim_stream(item, item->type)) { + if (cx18_claim_stream(&item, item.type)) { /* No, it's already in use */ - kfree(item); snd_cx18_unlock(cxsc); return -EBUSY; }