aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 19:50:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 20:31:13 -0400
commita6a3a17b7fdaf824e6d73e8e4a94c9d149302f74 (patch)
tree96d3eb21d192d12465c040f9eea34e58741bc2ff /drivers/media
parent172c122df5186e7cbd413d61757ff90267331002 (diff)
media: fix integer as NULL pointer warnings
drivers/media/video/v4l2-common.c:719:16: warning: Using plain integer as NULL pointer drivers/media/video/au0828/au0828-dvb.c:122:19: warning: Using plain integer as NULL pointer drivers/media/video/ivtv/ivtv-yuv.c:1101:22: warning: Using plain integer as NULL pointer drivers/media/video/ivtv/ivtv-yuv.c:1102:23: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-audio.c:78:39: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-video-v4l.c:84:39: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-v4l2.c:1264:9: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-context.c:197:28: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c:126:39: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-dvb.c:133:32: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-dvb.c:145:31: warning: Using plain integer as NULL pointer drivers/media/video/pvrusb2/pvrusb2-dvb.c:177:55: warning: Using plain integer as NULL pointer drivers/media/video/videobuf-core.c:100:9: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/au0828/au0828-dvb.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-yuv.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-audio.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-context.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-dvb.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-video-v4l.c2
-rw-r--r--drivers/media/video/v4l2-common.c2
-rw-r--r--drivers/media/video/videobuf-core.c5
10 files changed, 16 insertions, 13 deletions
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c
index 5040d7fc4af5..1371b4e4b5f1 100644
--- a/drivers/media/video/au0828/au0828-dvb.c
+++ b/drivers/media/video/au0828/au0828-dvb.c
@@ -119,7 +119,7 @@ static int start_urb_transfer(struct au0828_dev *dev)
119 purb->transfer_buffer = kzalloc(URB_BUFSIZE, GFP_KERNEL); 119 purb->transfer_buffer = kzalloc(URB_BUFSIZE, GFP_KERNEL);
120 if (!purb->transfer_buffer) { 120 if (!purb->transfer_buffer) {
121 usb_free_urb(purb); 121 usb_free_urb(purb);
122 dev->urbs[i] = 0; 122 dev->urbs[i] = NULL;
123 goto err; 123 goto err;
124 } 124 }
125 125
diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/video/ivtv/ivtv-yuv.c
index 393d917cd672..62f70bd5e3cb 100644
--- a/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/drivers/media/video/ivtv/ivtv-yuv.c
@@ -1098,8 +1098,8 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv)
1098 ivtv_yuv_next_free(itv); 1098 ivtv_yuv_next_free(itv);
1099 1099
1100 /* Copy V4L2 parameters to an ivtv_dma_frame struct... */ 1100 /* Copy V4L2 parameters to an ivtv_dma_frame struct... */
1101 dma_args.y_source = 0L; 1101 dma_args.y_source = NULL;
1102 dma_args.uv_source = 0L; 1102 dma_args.uv_source = NULL;
1103 dma_args.src.left = 0; 1103 dma_args.src.left = 0;
1104 dma_args.src.top = 0; 1104 dma_args.src.top = 0;
1105 dma_args.src.width = yi->v4l2_src_w; 1105 dma_args.src.width = yi->v4l2_src_w;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 9a7c8e9c3e8b..8d859ccd48ec 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -75,7 +75,7 @@ static void set_stereo(struct pvr2_msp3400_handler *ctxt)
75 pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo"); 75 pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo");
76 76
77 if ((sid < ARRAY_SIZE(routing_schemes)) && 77 if ((sid < ARRAY_SIZE(routing_schemes)) &&
78 ((sp = routing_schemes + sid) != 0) && 78 ((sp = routing_schemes + sid) != NULL) &&
79 (hdw->input_val >= 0) && 79 (hdw->input_val >= 0) &&
80 (hdw->input_val < sp->cnt)) { 80 (hdw->input_val < sp->cnt)) {
81 route.input = sp->def[hdw->input_val]; 81 route.input = sp->def[hdw->input_val];
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index b5db6a5bab31..73dcb1c57ae6 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -195,7 +195,7 @@ static int pvr2_context_thread_func(void *foo)
195int pvr2_context_global_init(void) 195int pvr2_context_global_init(void)
196{ 196{
197 pvr2_context_thread_ptr = kthread_run(pvr2_context_thread_func, 197 pvr2_context_thread_ptr = kthread_run(pvr2_context_thread_func,
198 0, 198 NULL,
199 "pvrusb2-context"); 199 "pvrusb2-context");
200 return (pvr2_context_thread_ptr ? 0 : -ENOMEM); 200 return (pvr2_context_thread_ptr ? 0 : -ENOMEM);
201} 201}
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index 97350b048b8d..29d50597c88a 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -123,7 +123,7 @@ static void set_input(struct pvr2_v4l_cx2584x *ctxt)
123 memset(&route,0,sizeof(route)); 123 memset(&route,0,sizeof(route));
124 124
125 if ((sid < ARRAY_SIZE(routing_schemes)) && 125 if ((sid < ARRAY_SIZE(routing_schemes)) &&
126 ((sp = routing_schemes + sid) != 0) && 126 ((sp = routing_schemes + sid) != NULL) &&
127 (hdw->input_val >= 0) && 127 (hdw->input_val >= 0) &&
128 (hdw->input_val < sp->cnt)) { 128 (hdw->input_val < sp->cnt)) {
129 vid_input = sp->def[hdw->input_val].vid; 129 vid_input = sp->def[hdw->input_val].vid;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/drivers/media/video/pvrusb2/pvrusb2-dvb.c
index 2e64f98d1241..6504c97e0bbc 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-dvb.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-dvb.c
@@ -130,7 +130,7 @@ static void pvr2_dvb_stream_end(struct pvr2_dvb_adapter *adap)
130 for (idx = 0; idx < PVR2_DVB_BUFFER_COUNT; idx++) { 130 for (idx = 0; idx < PVR2_DVB_BUFFER_COUNT; idx++) {
131 if (!(adap->buffer_storage[idx])) continue; 131 if (!(adap->buffer_storage[idx])) continue;
132 kfree(adap->buffer_storage[idx]); 132 kfree(adap->buffer_storage[idx]);
133 adap->buffer_storage[idx] = 0; 133 adap->buffer_storage[idx] = NULL;
134 } 134 }
135 adap->stream_run = 0; 135 adap->stream_run = 0;
136 } 136 }
@@ -142,7 +142,7 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
142 unsigned int idx; 142 unsigned int idx;
143 int ret; 143 int ret;
144 struct pvr2_buffer *bp; 144 struct pvr2_buffer *bp;
145 struct pvr2_stream *stream = 0; 145 struct pvr2_stream *stream = NULL;
146 146
147 if (adap->stream_run) return -EIO; 147 if (adap->stream_run) return -EIO;
148 148
@@ -174,7 +174,7 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
174 ret = pvr2_hdw_set_streaming(adap->channel.hdw, 1); 174 ret = pvr2_hdw_set_streaming(adap->channel.hdw, 1);
175 if (ret < 0) return ret; 175 if (ret < 0) return ret;
176 176
177 while ((bp = pvr2_stream_get_idle_buffer(stream)) != 0) { 177 while ((bp = pvr2_stream_get_idle_buffer(stream)) != NULL) {
178 ret = pvr2_buffer_queue(bp); 178 ret = pvr2_buffer_queue(bp);
179 if (ret < 0) return ret; 179 if (ret < 0) return ret;
180 } 180 }
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 087a18245560..e9b5d4e91327 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -1261,7 +1261,7 @@ struct pvr2_v4l2 *pvr2_v4l2_create(struct pvr2_context *mnp)
1261 fail: 1261 fail:
1262 pvr2_trace(PVR2_TRACE_STRUCT,"Failure creating pvr2_v4l2 id=%p",vp); 1262 pvr2_trace(PVR2_TRACE_STRUCT,"Failure creating pvr2_v4l2 id=%p",vp);
1263 pvr2_v4l2_destroy_no_lock(vp); 1263 pvr2_v4l2_destroy_no_lock(vp);
1264 return 0; 1264 return NULL;
1265} 1265}
1266 1266
1267/* 1267/*
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index 7c47345501b6..2433a3160041 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -81,7 +81,7 @@ static void set_input(struct pvr2_v4l_decoder *ctxt)
81 pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)",hdw->input_val); 81 pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)",hdw->input_val);
82 82
83 if ((sid < ARRAY_SIZE(routing_schemes)) && 83 if ((sid < ARRAY_SIZE(routing_schemes)) &&
84 ((sp = routing_schemes + sid) != 0) && 84 ((sp = routing_schemes + sid) != NULL) &&
85 (hdw->input_val >= 0) && 85 (hdw->input_val >= 0) &&
86 (hdw->input_val < sp->cnt)) { 86 (hdw->input_val < sp->cnt)) {
87 route.input = sp->def[hdw->input_val]; 87 route.input = sp->def[hdw->input_val];
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index 34deb68ae568..7cc42c1da457 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -716,7 +716,7 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver
716 int err; 716 int err;
717 717
718 client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 718 client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
719 if (client == 0) 719 if (!client)
720 return -ENOMEM; 720 return -ENOMEM;
721 721
722 client->addr = address; 722 client->addr = address;
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index fc51e4918bbf..982f4463896c 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -97,7 +97,10 @@ int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,
97void *videobuf_queue_to_vmalloc (struct videobuf_queue *q, 97void *videobuf_queue_to_vmalloc (struct videobuf_queue *q,
98 struct videobuf_buffer *buf) 98 struct videobuf_buffer *buf)
99{ 99{
100 return CALL(q, vmalloc, buf); 100 if (q->int_ops->vmalloc)
101 return q->int_ops->vmalloc(buf);
102 else
103 return NULL;
101} 104}
102EXPORT_SYMBOL_GPL(videobuf_queue_to_vmalloc); 105EXPORT_SYMBOL_GPL(videobuf_queue_to_vmalloc);
103 106