aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-06-02 22:01:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:07:51 -0400
commit96ceea2734d922d07000e98606231f3d675e09f8 (patch)
treec840d7f3cb867b5cd382cb83d54c6006b8d9d02a
parentd5709a0e3dfe22e24d871ef1e0eec9ae04055997 (diff)
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>
-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,
118 void *priv, 118 void *priv,
119 struct videobuf_qtype_ops *int_ops) 119 struct videobuf_qtype_ops *int_ops)
120{ 120{
121 BUG_ON(!q);
121 memset(q, 0, sizeof(*q)); 122 memset(q, 0, sizeof(*q));
122 q->irqlock = irqlock; 123 q->irqlock = irqlock;
123 q->dev = dev; 124 q->dev = dev;