diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-11-05 04:51:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-05 09:07:58 -0200 |
commit | a8d54e4cdfb8f903ee53148559254b0e3263669e (patch) | |
tree | 69f58d52968a013a3ee6e5b1a3468dd01faded19 /drivers/media/v4l2-core | |
parent | cf38d4b92dee1635967b8e85ae607e6fcf6be19e (diff) | |
download | linux-a8d54e4cdfb8f903ee53148559254b0e3263669e.tar.gz linux-a8d54e4cdfb8f903ee53148559254b0e3263669e.tar.bz2 linux-a8d54e4cdfb8f903ee53148559254b0e3263669e.zip |
[media] videobuf: fix sparse warnings
videobuf-core.c:834:23: warning: Using plain integer as NULL pointer
videobuf-core.c:851:28: warning: Using plain integer as NULL pointer
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/videobuf-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/videobuf-core.c b/drivers/media/v4l2-core/videobuf-core.c index b91a266d0b7e..926836d1813a 100644 --- a/drivers/media/v4l2-core/videobuf-core.c +++ b/drivers/media/v4l2-core/videobuf-core.c @@ -51,6 +51,8 @@ MODULE_LICENSE("GPL"); #define CALL(q, f, arg...) \ ((q->int_ops->f) ? q->int_ops->f(arg) : 0) +#define CALLPTR(q, f, arg...) \ + ((q->int_ops->f) ? q->int_ops->f(arg) : NULL) struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q) { @@ -831,7 +833,7 @@ static int __videobuf_copy_to_user(struct videobuf_queue *q, char __user *data, size_t count, int nonblocking) { - void *vaddr = CALL(q, vaddr, buf); + void *vaddr = CALLPTR(q, vaddr, buf); /* copy to userspace */ if (count > buf->size - q->read_off) @@ -848,7 +850,7 @@ static int __videobuf_copy_stream(struct videobuf_queue *q, char __user *data, size_t count, size_t pos, int vbihack, int nonblocking) { - unsigned int *fc = CALL(q, vaddr, buf); + unsigned int *fc = CALLPTR(q, vaddr, buf); if (vbihack) { /* dirty, undocumented hack -- pass the frame counter |