summaryrefslogtreecommitdiff
path: root/drivers/media/video/videobuf-core.c
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-02 23:01:04 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 19:07:51 -0300
commit96ceea2734d922d07000e98606231f3d675e09f8 (patch)
treec840d7f3cb867b5cd382cb83d54c6006b8d9d02a /drivers/media/video/videobuf-core.c
parentd5709a0e3dfe22e24d871ef1e0eec9ae04055997 (diff)
downloadlwn-96ceea2734d922d07000e98606231f3d675e09f8.tar.gz
lwn-96ceea2734d922d07000e98606231f3d675e09f8.zip
V4L/DVB (11991): buf-core.c: add pointer check
add poiter check for videobuf_queue_core_init(). any guys who write a v4l driver, pass a NULL pointer or a non-inintial pointer to the first parameter such as videobuf_queue_sg_init() , it would be crashed. Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-core.c')
-rw-r--r--drivers/media/video/videobuf-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index 48c3ebdb415f..f1ccf98c0a6f 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -118,6 +118,7 @@ void videobuf_queue_core_init(struct videobuf_queue *q,
void *priv,
struct videobuf_qtype_ops *int_ops)
{
+ BUG_ON(!q);
memset(q, 0, sizeof(*q));
q->irqlock = irqlock;
q->dev = dev;