RDMA/nes: Fix a check-after-use in nes_probe()
authorAdrian Bunk <bunk@kernel.org>
Thu, 21 Feb 2008 14:13:47 +0000 (08:13 -0600)
committerRoland Dreier <rolandd@cisco.com>
Wed, 27 Feb 2008 00:24:29 +0000 (16:24 -0800)
Fix a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes.c

index 7f8853b44ee173579d2af89d54c09acfa5117ff9..b2112f5a422fbd8bcf6d993f707a0b8b604ad5e1 100644 (file)
@@ -567,12 +567,12 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
 
        /* Init the adapter */
        nesdev->nesadapter = nes_init_adapter(nesdev, hw_rev);
-       nesdev->nesadapter->et_rx_coalesce_usecs_irq = interrupt_mod_interval;
        if (!nesdev->nesadapter) {
                printk(KERN_ERR PFX "Unable to initialize adapter.\n");
                ret = -ENOMEM;
                goto bail5;
        }
+       nesdev->nesadapter->et_rx_coalesce_usecs_irq = interrupt_mod_interval;
 
        /* nesdev->base_doorbell_index =
                        nesdev->nesadapter->pd_config_base[PCI_FUNC(nesdev->pcidev->devfn)]; */