]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
NULL noise: drivers/media
authorAl Viro <viro@ftp.linux.org.uk>
Sat, 29 Mar 2008 03:07:38 +0000 (03:07 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 30 Mar 2008 21:18:41 +0000 (14:18 -0700)
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24 files changed:
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_fops.c
drivers/media/dvb/dvb-core/dvb_net.c
drivers/media/video/adv7170.c
drivers/media/video/adv7175.c
drivers/media/video/bt819.c
drivers/media/video/bt856.c
drivers/media/video/dpc7146.c
drivers/media/video/mt20xx.c
drivers/media/video/mxb.c
drivers/media/video/pvrusb2/pvrusb2-ctrl.c
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/pvrusb2/pvrusb2-io.c
drivers/media/video/pvrusb2/pvrusb2-ioread.c
drivers/media/video/pwc/pwc-if.c
drivers/media/video/saa7110.c
drivers/media/video/saa7111.c
drivers/media/video/saa7114.c
drivers/media/video/saa7185.c
drivers/media/video/tda9840.c
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tvp5150.c
drivers/media/video/zoran_driver.c

index 168a8d3a5e556e889b7b44033b06531addb9faf8..7707b8c7394b17308c067b2813f6809e105c5072 100644 (file)
@@ -306,25 +306,22 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
                return IRQ_NONE;
        }
 
-       if( 0 != (dev->ext)) {
-               if( 0 != (dev->ext->irq_mask & isr )) {
-                       if( 0 != dev->ext->irq_func ) {
+       if (dev->ext) {
+               if (dev->ext->irq_mask & isr) {
+                       if (dev->ext->irq_func)
                                dev->ext->irq_func(dev, &isr);
-                       }
                        isr &= ~dev->ext->irq_mask;
                }
        }
        if (0 != (isr & (MASK_27))) {
                DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
-               if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+               if (dev->vv_data && dev->vv_callback)
                        dev->vv_callback(dev,isr);
-               }
                isr &= ~MASK_27;
        }
        if (0 != (isr & (MASK_28))) {
-               if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+               if (dev->vv_data && dev->vv_callback)
                        dev->vv_callback(dev,isr);
-               }
                isr &= ~MASK_28;
        }
        if (0 != (isr & (MASK_16|MASK_17))) {
index f0703d8bc3e8d9492e47382330db3f021dbb93e8..171afe7da6b60e9d66dd78259d987aada6eb0dfa 100644 (file)
@@ -272,7 +272,7 @@ static int fops_open(struct inode *inode, struct file *file)
 
        result = 0;
 out:
-       if( fh != 0 && result != 0 ) {
+       if (fh && result != 0) {
                kfree(fh);
                file->private_data = NULL;
        }
index ed3f8268ed11445e60fce10500a66e15d3e3be53..4c8b62e2c035246095e5fc6e750a3127e7a188b3 100644 (file)
@@ -784,8 +784,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
 {
        struct net_device *dev = feed->priv;
 
-       if (buffer2 != 0)
-               printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2);
+       if (buffer2)
+               printk(KERN_WARNING "buffer2 not NULL: %p.\n", buffer2);
        if (buffer1_len > 32768)
                printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
        /* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
index cbab53fc6243a830a94aaecb6fd122c61198611b..fea2e723e34b965da2853c58a9d2618d6f0a98f2 100644 (file)
@@ -408,7 +408,7 @@ adv7170_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index 0d0c554bfdf7bce39f3ca0736bf768d27047137f..10d4d89623f15431080c3fda94b37164c4dc67fd 100644 (file)
@@ -426,7 +426,7 @@ adv7175_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index 12d1b9248be599faa2d7bababc59c9d4816632b8..e663cc045c41c7a1748145b0b78f7ea41860c628 100644 (file)
@@ -524,7 +524,7 @@ bt819_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index e1028a76c042046760d3a634552c92a9bd441006..7dee2e3235ad5619a735c0c74db3c4c67d25cd32 100644 (file)
@@ -311,7 +311,7 @@ bt856_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index 566e479e2629086145954876da78da7dc5cd7e60..9ceb6b2f394920af86ff64bc7be36f3a080c3cfb 100644 (file)
@@ -131,7 +131,7 @@ static int dpc_probe(struct saa7146_dev* dev)
        device_for_each_child(&dpc->i2c_adapter.dev, dpc, dpc_check_clients);
 
        /* check if all devices are present */
-       if( 0 == dpc->saa7111a ) {
+       if (!dpc->saa7111a) {
                DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));
                i2c_del_adapter(&dpc->i2c_adapter);
                kfree(dpc);
index 58bab653330fee8ce0b6e26d618cd02c3c9fb37e..74fd6a01d4c4060b05037f93d7069715b0b41433 100644 (file)
@@ -647,7 +647,7 @@ struct dvb_frontend *microtune_attach(struct dvb_frontend *fe,
        default:
                tuner_info("microtune %s found, not (yet?) supported, sorry :-/\n",
                           name);
-               return 0;
+               return NULL;
        }
 
        strlcpy(fe->ops.tuner_ops.info.name, name,
index add6d0d680bed7fc8e43ac6d687232cd12627ab9..cb5a510f9251b49f5e1a9ccfecf0d386b7e80c0b 100644 (file)
@@ -221,9 +221,8 @@ static int mxb_probe(struct saa7146_dev* dev)
        device_for_each_child(&mxb->i2c_adapter.dev, mxb, mxb_check_clients);
 
        /* check if all devices are present */
-       if(    0 == mxb->tea6420_1      || 0 == mxb->tea6420_2  || 0 == mxb->tea6415c
-           || 0 == mxb->tda9840        || 0 == mxb->saa7111a   || 0 == mxb->tuner ) {
-
+       if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c ||
+           !mxb->tda9840 || !mxb->saa7111a || !mxb->tuner) {
                printk("mxb: did not find all i2c devices. aborting\n");
                i2c_del_adapter(&mxb->i2c_adapter);
                kfree(mxb);
index 46f156fb108c79ffe2506470b857466f03ea6d10..5a3e8d21a38ae7e95b58cd4940a4b905186928d5 100644 (file)
@@ -60,7 +60,7 @@ int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *cptr,int mask,int val)
        int ret = 0;
        if (!cptr) return -EINVAL;
        LOCK_TAKE(cptr->hdw->big_lock); do {
-               if (cptr->info->set_value != 0) {
+               if (cptr->info->set_value) {
                        if (cptr->info->type == pvr2_ctl_bitmask) {
                                mask &= cptr->info->def.type_bitmask.valid_bits;
                        } else if (cptr->info->type == pvr2_ctl_int) {
@@ -265,7 +265,7 @@ unsigned int pvr2_ctrl_get_v4lflags(struct pvr2_ctrl *cptr)
 int pvr2_ctrl_is_writable(struct pvr2_ctrl *cptr)
 {
        if (!cptr) return 0;
-       return cptr->info->set_value != 0;
+       return cptr->info->set_value != NULL;
 }
 
 
index 41ae980405edfac42a38cc22449389a68fe9658c..d6955fa39598bdce1b5be999e247a5179248db43 100644 (file)
@@ -2291,7 +2291,7 @@ static int pvr2_hdw_commit_setup(struct pvr2_hdw *hdw)
 
        for (idx = 0; idx < hdw->control_cnt; idx++) {
                cptr = hdw->controls + idx;
-               if (cptr->info->is_dirty == 0) continue;
+               if (!cptr->info->is_dirty) continue;
                if (!cptr->info->is_dirty(cptr)) continue;
                commit_flag = !0;
 
@@ -2646,7 +2646,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
        u16 address;
        unsigned int pipe;
        LOCK_TAKE(hdw->big_lock); do {
-               if ((hdw->fw_buffer == 0) == !enable_flag) break;
+               if ((hdw->fw_buffer == NULL) == !enable_flag) break;
 
                if (!enable_flag) {
                        pvr2_trace(PVR2_TRACE_FIRMWARE,
@@ -2715,7 +2715,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
 /* Return true if we're in a mode for retrieval CPU firmware */
 int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *hdw)
 {
-       return hdw->fw_buffer != 0;
+       return hdw->fw_buffer != NULL;
 }
 
 
index ce3c8982ffe088aa6378da27ef18a9af4e6e9545..a9889ff96ecc945b1f344c9fd4ab7e8eced695e0 100644 (file)
@@ -563,7 +563,7 @@ void pvr2_stream_kill(struct pvr2_stream *sp)
        struct pvr2_buffer *bp;
        mutex_lock(&sp->mutex); do {
                pvr2_stream_internal_flush(sp);
-               while ((bp = pvr2_stream_get_ready_buffer(sp)) != 0) {
+               while ((bp = pvr2_stream_get_ready_buffer(sp)) != NULL) {
                        pvr2_buffer_set_idle(bp);
                }
                if (sp->buffer_total_count != sp->buffer_target_count) {
index f782418afa45db71c6a07e27382db0e5a5637b3e..c572212c9f158feddba21f5757ad8018016a73a5 100644 (file)
@@ -165,7 +165,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp)
        if (!(cp->stream)) return 0;
        pvr2_trace(PVR2_TRACE_START_STOP,
                   "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp);
-       while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != 0) {
+       while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != NULL) {
                stat = pvr2_buffer_queue(bp);
                if (stat < 0) {
                        pvr2_trace(PVR2_TRACE_DATA_FLOW,
index f991d72fe10808d29263e7c0cb6411e9f93bc0b1..e0a453a6543d2526c2ba3ef39e1dd86901c8c89e 100644 (file)
@@ -915,7 +915,7 @@ static void pwc_iso_stop(struct pwc_device *pdev)
                struct urb *urb;
 
                urb = pdev->sbuf[i].urb;
-               if (urb != 0) {
+               if (urb) {
                        PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb);
                        usb_kill_urb(urb);
                }
@@ -931,7 +931,7 @@ static void pwc_iso_free(struct pwc_device *pdev)
                struct urb *urb;
 
                urb = pdev->sbuf[i].urb;
-               if (urb != 0) {
+               if (urb) {
                        PWC_DEBUG_MEMORY("Freeing URB\n");
                        usb_free_urb(urb);
                        pdev->sbuf[i].urb = NULL;
@@ -1759,8 +1759,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 
        /* Allocate video_device structure */
        pdev->vdev = video_device_alloc();
-       if (pdev->vdev == 0)
-       {
+       if (!pdev->vdev) {
                PWC_ERROR("Err, cannot allocate video_device struture. Failing probe.");
                kfree(pdev);
                return -ENOMEM;
index 061134a7ba9fe7ce69cdf91f6937710a7a459b82..1df2602cd1842c40d0ed1a9ca56d2793221e8a0c 100644 (file)
@@ -488,7 +488,7 @@ saa7110_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
@@ -496,7 +496,7 @@ saa7110_detect_client (struct i2c_adapter *adapter,
        strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client)));
 
        decoder = kzalloc(sizeof(struct saa7110), GFP_KERNEL);
-       if (decoder == 0) {
+       if (!decoder) {
                kfree(client);
                return -ENOMEM;
        }
index 7ae2d646d0008f12a8a94fd2058c6e0673dac076..a0772c53bb1f5e78c8dd2a00b5dd529664805683 100644 (file)
@@ -502,7 +502,7 @@ saa7111_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index 677df51de1a9e3136856dd417260df4e5dd1a46e..bf91a4faa706f154903b9be9f7069fb9e55ded2a 100644 (file)
@@ -841,7 +841,7 @@ saa7114_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index 66cc92c0ea66f725a43a29ea652621218ff11212..41f70440fd3bcb2b842720680d4d42a3b97476a9 100644 (file)
@@ -403,7 +403,7 @@ saa7185_detect_client (struct i2c_adapter *adapter,
                return 0;
 
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (client == 0)
+       if (!client)
                return -ENOMEM;
        client->addr = address;
        client->adapter = adapter;
index ef494febb5e4f7996c9752861cde4134c6c74c80..bdca5d278978374b7a65e7e55bd65aa06a010ee2 100644 (file)
@@ -172,7 +172,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind)
 
        /* allocate memory for client structure */
        client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (0 == client) {
+       if (!client) {
                printk("not enough kernel memory\n");
                return -ENOMEM;
        }
index 523df0b8cc63c387e4446a41a91fe62d8e392d3a..df2fad9f391eb0a2936b8c14c39c51a1273a0e0c 100644 (file)
@@ -64,7 +64,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind)
 
        /* allocate memory for client structure */
        client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (0 == client) {
+       if (!client) {
                return -ENOMEM;
        }
 
index ca05cd65508765559524b104dc7805ab5dad278f..4ff6c63f7237517a05d974fd60cfbcbb838af0cf 100644 (file)
@@ -101,7 +101,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
 
        /* allocate memory for client structure */
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (0 == client) {
+       if (!client) {
                return -ENOMEM;
        }
 
index d28318cb2b8d2a5b88c3d048ad27c8cbd6661cc1..b6e24e714a230c1e53e212687dd97b1140cf0f22 100644 (file)
@@ -1072,12 +1072,12 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter,
                return 0;
 
        c = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (c == 0)
+       if (!c)
                return -ENOMEM;
        memcpy(c, &client_template, sizeof(struct i2c_client));
 
        core = kzalloc(sizeof(struct tvp5150), GFP_KERNEL);
-       if (core == 0) {
+       if (!core) {
                kfree(c);
                return -ENOMEM;
        }
index dd3d7d2c8b0e38323ed29e2a9b21a6a429a46111..fea4946ee713c82d4b17eaff5864ccb943a9f545 100644 (file)
@@ -339,7 +339,7 @@ v4l_fbuffer_alloc (struct file *file)
                        /* Use kmalloc */
 
                        mem = kmalloc(fh->v4l_buffers.buffer_size, GFP_KERNEL);
-                       if (mem == 0) {
+                       if (!mem) {
                                dprintk(1,
                                        KERN_ERR
                                        "%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n",