diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-03-28 23:07:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-30 17:18:41 -0400 |
commit | 5fa1247a2b56f33f88432c24e109deaf91ef8281 (patch) | |
tree | dfecaeddc223a7649625a401a8f13bc67ae3414c | |
parent | 8481664d373e7e2cea3ea0c2d7a06c9e939b19ee (diff) |
NULL noise: drivers/media
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24 files changed, 37 insertions, 42 deletions
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index 168a8d3a5e55..7707b8c7394b 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c | |||
@@ -306,25 +306,22 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id) | |||
306 | return IRQ_NONE; | 306 | return IRQ_NONE; |
307 | } | 307 | } |
308 | 308 | ||
309 | if( 0 != (dev->ext)) { | 309 | if (dev->ext) { |
310 | if( 0 != (dev->ext->irq_mask & isr )) { | 310 | if (dev->ext->irq_mask & isr) { |
311 | if( 0 != dev->ext->irq_func ) { | 311 | if (dev->ext->irq_func) |
312 | dev->ext->irq_func(dev, &isr); | 312 | dev->ext->irq_func(dev, &isr); |
313 | } | ||
314 | isr &= ~dev->ext->irq_mask; | 313 | isr &= ~dev->ext->irq_mask; |
315 | } | 314 | } |
316 | } | 315 | } |
317 | if (0 != (isr & (MASK_27))) { | 316 | if (0 != (isr & (MASK_27))) { |
318 | DEB_INT(("irq: RPS0 (0x%08x).\n",isr)); | 317 | DEB_INT(("irq: RPS0 (0x%08x).\n",isr)); |
319 | if( 0 != dev->vv_data && 0 != dev->vv_callback) { | 318 | if (dev->vv_data && dev->vv_callback) |
320 | dev->vv_callback(dev,isr); | 319 | dev->vv_callback(dev,isr); |
321 | } | ||
322 | isr &= ~MASK_27; | 320 | isr &= ~MASK_27; |
323 | } | 321 | } |
324 | if (0 != (isr & (MASK_28))) { | 322 | if (0 != (isr & (MASK_28))) { |
325 | if( 0 != dev->vv_data && 0 != dev->vv_callback) { | 323 | if (dev->vv_data && dev->vv_callback) |
326 | dev->vv_callback(dev,isr); | 324 | dev->vv_callback(dev,isr); |
327 | } | ||
328 | isr &= ~MASK_28; | 325 | isr &= ~MASK_28; |
329 | } | 326 | } |
330 | if (0 != (isr & (MASK_16|MASK_17))) { | 327 | if (0 != (isr & (MASK_16|MASK_17))) { |
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index f0703d8bc3e8..171afe7da6b6 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -272,7 +272,7 @@ static int fops_open(struct inode *inode, struct file *file) | |||
272 | 272 | ||
273 | result = 0; | 273 | result = 0; |
274 | out: | 274 | out: |
275 | if( fh != 0 && result != 0 ) { | 275 | if (fh && result != 0) { |
276 | kfree(fh); | 276 | kfree(fh); |
277 | file->private_data = NULL; | 277 | file->private_data = NULL; |
278 | } | 278 | } |
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index ed3f8268ed11..4c8b62e2c035 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -784,8 +784,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
784 | { | 784 | { |
785 | struct net_device *dev = feed->priv; | 785 | struct net_device *dev = feed->priv; |
786 | 786 | ||
787 | if (buffer2 != 0) | 787 | if (buffer2) |
788 | printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2); | 788 | printk(KERN_WARNING "buffer2 not NULL: %p.\n", buffer2); |
789 | if (buffer1_len > 32768) | 789 | if (buffer1_len > 32768) |
790 | printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len); | 790 | printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len); |
791 | /* printk("TS callback: %u bytes, %u TS cells @ %p.\n", | 791 | /* printk("TS callback: %u bytes, %u TS cells @ %p.\n", |
diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index cbab53fc6243..fea2e723e34b 100644 --- a/drivers/media/video/adv7170.c +++ b/drivers/media/video/adv7170.c | |||
@@ -408,7 +408,7 @@ adv7170_detect_client (struct i2c_adapter *adapter, | |||
408 | return 0; | 408 | return 0; |
409 | 409 | ||
410 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 410 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
411 | if (client == 0) | 411 | if (!client) |
412 | return -ENOMEM; | 412 | return -ENOMEM; |
413 | client->addr = address; | 413 | client->addr = address; |
414 | client->adapter = adapter; | 414 | client->adapter = adapter; |
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index 0d0c554bfdf7..10d4d89623f1 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c | |||
@@ -426,7 +426,7 @@ adv7175_detect_client (struct i2c_adapter *adapter, | |||
426 | return 0; | 426 | return 0; |
427 | 427 | ||
428 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 428 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
429 | if (client == 0) | 429 | if (!client) |
430 | return -ENOMEM; | 430 | return -ENOMEM; |
431 | client->addr = address; | 431 | client->addr = address; |
432 | client->adapter = adapter; | 432 | client->adapter = adapter; |
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 12d1b9248be5..e663cc045c41 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c | |||
@@ -524,7 +524,7 @@ bt819_detect_client (struct i2c_adapter *adapter, | |||
524 | return 0; | 524 | return 0; |
525 | 525 | ||
526 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 526 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
527 | if (client == 0) | 527 | if (!client) |
528 | return -ENOMEM; | 528 | return -ENOMEM; |
529 | client->addr = address; | 529 | client->addr = address; |
530 | client->adapter = adapter; | 530 | client->adapter = adapter; |
diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index e1028a76c042..7dee2e3235ad 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c | |||
@@ -311,7 +311,7 @@ bt856_detect_client (struct i2c_adapter *adapter, | |||
311 | return 0; | 311 | return 0; |
312 | 312 | ||
313 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 313 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
314 | if (client == 0) | 314 | if (!client) |
315 | return -ENOMEM; | 315 | return -ENOMEM; |
316 | client->addr = address; | 316 | client->addr = address; |
317 | client->adapter = adapter; | 317 | client->adapter = adapter; |
diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index 566e479e2629..9ceb6b2f3949 100644 --- a/drivers/media/video/dpc7146.c +++ b/drivers/media/video/dpc7146.c | |||
@@ -131,7 +131,7 @@ static int dpc_probe(struct saa7146_dev* dev) | |||
131 | device_for_each_child(&dpc->i2c_adapter.dev, dpc, dpc_check_clients); | 131 | device_for_each_child(&dpc->i2c_adapter.dev, dpc, dpc_check_clients); |
132 | 132 | ||
133 | /* check if all devices are present */ | 133 | /* check if all devices are present */ |
134 | if( 0 == dpc->saa7111a ) { | 134 | if (!dpc->saa7111a) { |
135 | DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); | 135 | DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); |
136 | i2c_del_adapter(&dpc->i2c_adapter); | 136 | i2c_del_adapter(&dpc->i2c_adapter); |
137 | kfree(dpc); | 137 | kfree(dpc); |
diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c index 58bab653330f..74fd6a01d4c4 100644 --- a/drivers/media/video/mt20xx.c +++ b/drivers/media/video/mt20xx.c | |||
@@ -647,7 +647,7 @@ struct dvb_frontend *microtune_attach(struct dvb_frontend *fe, | |||
647 | default: | 647 | default: |
648 | tuner_info("microtune %s found, not (yet?) supported, sorry :-/\n", | 648 | tuner_info("microtune %s found, not (yet?) supported, sorry :-/\n", |
649 | name); | 649 | name); |
650 | return 0; | 650 | return NULL; |
651 | } | 651 | } |
652 | 652 | ||
653 | strlcpy(fe->ops.tuner_ops.info.name, name, | 653 | strlcpy(fe->ops.tuner_ops.info.name, name, |
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index add6d0d680be..cb5a510f9251 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -221,9 +221,8 @@ static int mxb_probe(struct saa7146_dev* dev) | |||
221 | device_for_each_child(&mxb->i2c_adapter.dev, mxb, mxb_check_clients); | 221 | device_for_each_child(&mxb->i2c_adapter.dev, mxb, mxb_check_clients); |
222 | 222 | ||
223 | /* check if all devices are present */ | 223 | /* check if all devices are present */ |
224 | if( 0 == mxb->tea6420_1 || 0 == mxb->tea6420_2 || 0 == mxb->tea6415c | 224 | if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c || |
225 | || 0 == mxb->tda9840 || 0 == mxb->saa7111a || 0 == mxb->tuner ) { | 225 | !mxb->tda9840 || !mxb->saa7111a || !mxb->tuner) { |
226 | |||
227 | printk("mxb: did not find all i2c devices. aborting\n"); | 226 | printk("mxb: did not find all i2c devices. aborting\n"); |
228 | i2c_del_adapter(&mxb->i2c_adapter); | 227 | i2c_del_adapter(&mxb->i2c_adapter); |
229 | kfree(mxb); | 228 | kfree(mxb); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 46f156fb108c..5a3e8d21a38a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | |||
@@ -60,7 +60,7 @@ int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *cptr,int mask,int val) | |||
60 | int ret = 0; | 60 | int ret = 0; |
61 | if (!cptr) return -EINVAL; | 61 | if (!cptr) return -EINVAL; |
62 | LOCK_TAKE(cptr->hdw->big_lock); do { | 62 | LOCK_TAKE(cptr->hdw->big_lock); do { |
63 | if (cptr->info->set_value != 0) { | 63 | if (cptr->info->set_value) { |
64 | if (cptr->info->type == pvr2_ctl_bitmask) { | 64 | if (cptr->info->type == pvr2_ctl_bitmask) { |
65 | mask &= cptr->info->def.type_bitmask.valid_bits; | 65 | mask &= cptr->info->def.type_bitmask.valid_bits; |
66 | } else if (cptr->info->type == pvr2_ctl_int) { | 66 | } else if (cptr->info->type == pvr2_ctl_int) { |
@@ -265,7 +265,7 @@ unsigned int pvr2_ctrl_get_v4lflags(struct pvr2_ctrl *cptr) | |||
265 | int pvr2_ctrl_is_writable(struct pvr2_ctrl *cptr) | 265 | int pvr2_ctrl_is_writable(struct pvr2_ctrl *cptr) |
266 | { | 266 | { |
267 | if (!cptr) return 0; | 267 | if (!cptr) return 0; |
268 | return cptr->info->set_value != 0; | 268 | return cptr->info->set_value != NULL; |
269 | } | 269 | } |
270 | 270 | ||
271 | 271 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 41ae980405ed..d6955fa39598 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2291,7 +2291,7 @@ static int pvr2_hdw_commit_setup(struct pvr2_hdw *hdw) | |||
2291 | 2291 | ||
2292 | for (idx = 0; idx < hdw->control_cnt; idx++) { | 2292 | for (idx = 0; idx < hdw->control_cnt; idx++) { |
2293 | cptr = hdw->controls + idx; | 2293 | cptr = hdw->controls + idx; |
2294 | if (cptr->info->is_dirty == 0) continue; | 2294 | if (!cptr->info->is_dirty) continue; |
2295 | if (!cptr->info->is_dirty(cptr)) continue; | 2295 | if (!cptr->info->is_dirty(cptr)) continue; |
2296 | commit_flag = !0; | 2296 | commit_flag = !0; |
2297 | 2297 | ||
@@ -2646,7 +2646,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, | |||
2646 | u16 address; | 2646 | u16 address; |
2647 | unsigned int pipe; | 2647 | unsigned int pipe; |
2648 | LOCK_TAKE(hdw->big_lock); do { | 2648 | LOCK_TAKE(hdw->big_lock); do { |
2649 | if ((hdw->fw_buffer == 0) == !enable_flag) break; | 2649 | if ((hdw->fw_buffer == NULL) == !enable_flag) break; |
2650 | 2650 | ||
2651 | if (!enable_flag) { | 2651 | if (!enable_flag) { |
2652 | pvr2_trace(PVR2_TRACE_FIRMWARE, | 2652 | pvr2_trace(PVR2_TRACE_FIRMWARE, |
@@ -2715,7 +2715,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, | |||
2715 | /* Return true if we're in a mode for retrieval CPU firmware */ | 2715 | /* Return true if we're in a mode for retrieval CPU firmware */ |
2716 | int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *hdw) | 2716 | int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *hdw) |
2717 | { | 2717 | { |
2718 | return hdw->fw_buffer != 0; | 2718 | return hdw->fw_buffer != NULL; |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | 2721 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c index ce3c8982ffe0..a9889ff96ecc 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-io.c +++ b/drivers/media/video/pvrusb2/pvrusb2-io.c | |||
@@ -563,7 +563,7 @@ void pvr2_stream_kill(struct pvr2_stream *sp) | |||
563 | struct pvr2_buffer *bp; | 563 | struct pvr2_buffer *bp; |
564 | mutex_lock(&sp->mutex); do { | 564 | mutex_lock(&sp->mutex); do { |
565 | pvr2_stream_internal_flush(sp); | 565 | pvr2_stream_internal_flush(sp); |
566 | while ((bp = pvr2_stream_get_ready_buffer(sp)) != 0) { | 566 | while ((bp = pvr2_stream_get_ready_buffer(sp)) != NULL) { |
567 | pvr2_buffer_set_idle(bp); | 567 | pvr2_buffer_set_idle(bp); |
568 | } | 568 | } |
569 | if (sp->buffer_total_count != sp->buffer_target_count) { | 569 | if (sp->buffer_total_count != sp->buffer_target_count) { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c index f782418afa45..c572212c9f15 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c | |||
@@ -165,7 +165,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) | |||
165 | if (!(cp->stream)) return 0; | 165 | if (!(cp->stream)) return 0; |
166 | pvr2_trace(PVR2_TRACE_START_STOP, | 166 | pvr2_trace(PVR2_TRACE_START_STOP, |
167 | "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp); | 167 | "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp); |
168 | while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != 0) { | 168 | while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != NULL) { |
169 | stat = pvr2_buffer_queue(bp); | 169 | stat = pvr2_buffer_queue(bp); |
170 | if (stat < 0) { | 170 | if (stat < 0) { |
171 | pvr2_trace(PVR2_TRACE_DATA_FLOW, | 171 | pvr2_trace(PVR2_TRACE_DATA_FLOW, |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index f991d72fe108..e0a453a6543d 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -915,7 +915,7 @@ static void pwc_iso_stop(struct pwc_device *pdev) | |||
915 | struct urb *urb; | 915 | struct urb *urb; |
916 | 916 | ||
917 | urb = pdev->sbuf[i].urb; | 917 | urb = pdev->sbuf[i].urb; |
918 | if (urb != 0) { | 918 | if (urb) { |
919 | PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb); | 919 | PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb); |
920 | usb_kill_urb(urb); | 920 | usb_kill_urb(urb); |
921 | } | 921 | } |
@@ -931,7 +931,7 @@ static void pwc_iso_free(struct pwc_device *pdev) | |||
931 | struct urb *urb; | 931 | struct urb *urb; |
932 | 932 | ||
933 | urb = pdev->sbuf[i].urb; | 933 | urb = pdev->sbuf[i].urb; |
934 | if (urb != 0) { | 934 | if (urb) { |
935 | PWC_DEBUG_MEMORY("Freeing URB\n"); | 935 | PWC_DEBUG_MEMORY("Freeing URB\n"); |
936 | usb_free_urb(urb); | 936 | usb_free_urb(urb); |
937 | pdev->sbuf[i].urb = NULL; | 937 | pdev->sbuf[i].urb = NULL; |
@@ -1759,8 +1759,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id | |||
1759 | 1759 | ||
1760 | /* Allocate video_device structure */ | 1760 | /* Allocate video_device structure */ |
1761 | pdev->vdev = video_device_alloc(); | 1761 | pdev->vdev = video_device_alloc(); |
1762 | if (pdev->vdev == 0) | 1762 | if (!pdev->vdev) { |
1763 | { | ||
1764 | PWC_ERROR("Err, cannot allocate video_device struture. Failing probe."); | 1763 | PWC_ERROR("Err, cannot allocate video_device struture. Failing probe."); |
1765 | kfree(pdev); | 1764 | kfree(pdev); |
1766 | return -ENOMEM; | 1765 | return -ENOMEM; |
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index 061134a7ba9f..1df2602cd184 100644 --- a/drivers/media/video/saa7110.c +++ b/drivers/media/video/saa7110.c | |||
@@ -488,7 +488,7 @@ saa7110_detect_client (struct i2c_adapter *adapter, | |||
488 | return 0; | 488 | return 0; |
489 | 489 | ||
490 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 490 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
491 | if (client == 0) | 491 | if (!client) |
492 | return -ENOMEM; | 492 | return -ENOMEM; |
493 | client->addr = address; | 493 | client->addr = address; |
494 | client->adapter = adapter; | 494 | client->adapter = adapter; |
@@ -496,7 +496,7 @@ saa7110_detect_client (struct i2c_adapter *adapter, | |||
496 | strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); | 496 | strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); |
497 | 497 | ||
498 | decoder = kzalloc(sizeof(struct saa7110), GFP_KERNEL); | 498 | decoder = kzalloc(sizeof(struct saa7110), GFP_KERNEL); |
499 | if (decoder == 0) { | 499 | if (!decoder) { |
500 | kfree(client); | 500 | kfree(client); |
501 | return -ENOMEM; | 501 | return -ENOMEM; |
502 | } | 502 | } |
diff --git a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c index 7ae2d646d000..a0772c53bb1f 100644 --- a/drivers/media/video/saa7111.c +++ b/drivers/media/video/saa7111.c | |||
@@ -502,7 +502,7 @@ saa7111_detect_client (struct i2c_adapter *adapter, | |||
502 | return 0; | 502 | return 0; |
503 | 503 | ||
504 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 504 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
505 | if (client == 0) | 505 | if (!client) |
506 | return -ENOMEM; | 506 | return -ENOMEM; |
507 | client->addr = address; | 507 | client->addr = address; |
508 | client->adapter = adapter; | 508 | client->adapter = adapter; |
diff --git a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c index 677df51de1a9..bf91a4faa706 100644 --- a/drivers/media/video/saa7114.c +++ b/drivers/media/video/saa7114.c | |||
@@ -841,7 +841,7 @@ saa7114_detect_client (struct i2c_adapter *adapter, | |||
841 | return 0; | 841 | return 0; |
842 | 842 | ||
843 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 843 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
844 | if (client == 0) | 844 | if (!client) |
845 | return -ENOMEM; | 845 | return -ENOMEM; |
846 | client->addr = address; | 846 | client->addr = address; |
847 | client->adapter = adapter; | 847 | client->adapter = adapter; |
diff --git a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c index 66cc92c0ea66..41f70440fd3b 100644 --- a/drivers/media/video/saa7185.c +++ b/drivers/media/video/saa7185.c | |||
@@ -403,7 +403,7 @@ saa7185_detect_client (struct i2c_adapter *adapter, | |||
403 | return 0; | 403 | return 0; |
404 | 404 | ||
405 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 405 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
406 | if (client == 0) | 406 | if (!client) |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | client->addr = address; | 408 | client->addr = address; |
409 | client->adapter = adapter; | 409 | client->adapter = adapter; |
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index ef494febb5e4..bdca5d278978 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c | |||
@@ -172,7 +172,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind) | |||
172 | 172 | ||
173 | /* allocate memory for client structure */ | 173 | /* allocate memory for client structure */ |
174 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 174 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); |
175 | if (0 == client) { | 175 | if (!client) { |
176 | printk("not enough kernel memory\n"); | 176 | printk("not enough kernel memory\n"); |
177 | return -ENOMEM; | 177 | return -ENOMEM; |
178 | } | 178 | } |
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index 523df0b8cc63..df2fad9f391e 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c | |||
@@ -64,7 +64,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind) | |||
64 | 64 | ||
65 | /* allocate memory for client structure */ | 65 | /* allocate memory for client structure */ |
66 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 66 | client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); |
67 | if (0 == client) { | 67 | if (!client) { |
68 | return -ENOMEM; | 68 | return -ENOMEM; |
69 | } | 69 | } |
70 | 70 | ||
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index ca05cd655087..4ff6c63f7237 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -101,7 +101,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind) | |||
101 | 101 | ||
102 | /* allocate memory for client structure */ | 102 | /* allocate memory for client structure */ |
103 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | 103 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
104 | if (0 == client) { | 104 | if (!client) { |
105 | return -ENOMEM; | 105 | return -ENOMEM; |
106 | } | 106 | } |
107 | 107 | ||
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index d28318cb2b8d..b6e24e714a23 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -1072,12 +1072,12 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, | |||
1072 | return 0; | 1072 | return 0; |
1073 | 1073 | ||
1074 | c = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 1074 | c = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); |
1075 | if (c == 0) | 1075 | if (!c) |
1076 | return -ENOMEM; | 1076 | return -ENOMEM; |
1077 | memcpy(c, &client_template, sizeof(struct i2c_client)); | 1077 | memcpy(c, &client_template, sizeof(struct i2c_client)); |
1078 | 1078 | ||
1079 | core = kzalloc(sizeof(struct tvp5150), GFP_KERNEL); | 1079 | core = kzalloc(sizeof(struct tvp5150), GFP_KERNEL); |
1080 | if (core == 0) { | 1080 | if (!core) { |
1081 | kfree(c); | 1081 | kfree(c); |
1082 | return -ENOMEM; | 1082 | return -ENOMEM; |
1083 | } | 1083 | } |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index dd3d7d2c8b0e..fea4946ee713 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -339,7 +339,7 @@ v4l_fbuffer_alloc (struct file *file) | |||
339 | /* Use kmalloc */ | 339 | /* Use kmalloc */ |
340 | 340 | ||
341 | mem = kmalloc(fh->v4l_buffers.buffer_size, GFP_KERNEL); | 341 | mem = kmalloc(fh->v4l_buffers.buffer_size, GFP_KERNEL); |
342 | if (mem == 0) { | 342 | if (!mem) { |
343 | dprintk(1, | 343 | dprintk(1, |
344 | KERN_ERR | 344 | KERN_ERR |
345 | "%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n", | 345 | "%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n", |