diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 256501384af71d312f10244b2585301189be7702..eb3b98400c1b6c802a292a0deb61e54d678862c4 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -880,6 +880,9 @@ int videobuf_mmap_free(struct videobuf_queue *q) int i; int rc; + if (!q) + return 0; + MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS); rc = CALL(q,mmap_free,q);