aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-11-05 02:51:26 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-05 06:07:58 -0500
commita8d54e4cdfb8f903ee53148559254b0e3263669e (patch)
tree69f58d52968a013a3ee6e5b1a3468dd01faded19
parentcf38d4b92dee1635967b8e85ae607e6fcf6be19e (diff)
[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>
-rw-r--r--drivers/media/v4l2-core/videobuf-core.c6
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");
51 51
52#define CALL(q, f, arg...) \ 52#define CALL(q, f, arg...) \
53 ((q->int_ops->f) ? q->int_ops->f(arg) : 0) 53 ((q->int_ops->f) ? q->int_ops->f(arg) : 0)
54#define CALLPTR(q, f, arg...) \
55 ((q->int_ops->f) ? q->int_ops->f(arg) : NULL)
54 56
55struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q) 57struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q)
56{ 58{
@@ -831,7 +833,7 @@ static int __videobuf_copy_to_user(struct videobuf_queue *q,
831 char __user *data, size_t count, 833 char __user *data, size_t count,
832 int nonblocking) 834 int nonblocking)
833{ 835{
834 void *vaddr = CALL(q, vaddr, buf); 836 void *vaddr = CALLPTR(q, vaddr, buf);
835 837
836 /* copy to userspace */ 838 /* copy to userspace */
837 if (count > buf->size - q->read_off) 839 if (count > buf->size - q->read_off)
@@ -848,7 +850,7 @@ static int __videobuf_copy_stream(struct videobuf_queue *q,
848 char __user *data, size_t count, size_t pos, 850 char __user *data, size_t count, size_t pos,
849 int vbihack, int nonblocking) 851 int vbihack, int nonblocking)
850{ 852{
851 unsigned int *fc = CALL(q, vaddr, buf); 853 unsigned int *fc = CALLPTR(q, vaddr, buf);
852 854
853 if (vbihack) { 855 if (vbihack) {
854 /* dirty, undocumented hack -- pass the frame counter 856 /* dirty, undocumented hack -- pass the frame counter