summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/amso1100/c2.c
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2006-11-08 14:23:22 -0600
committerRoland Dreier <rolandd@cisco.com>2006-11-13 09:38:04 -0800
commit2ffcab6ae44b02679229ca1852526d0a6e062dd2 (patch)
treec99a55514f37f6c8b21e0879a247c508c9346bfd /drivers/infiniband/hw/amso1100/c2.c
parentf2c238a0c5e155acd49752c5fb93fb8d8534232b (diff)
RDMA/amso1100: Fix unitialized pseudo_netdev accessed in c2_register_device
Rework some load-time error handling: c2_register_device() leaked when it failed, and the function that called it didn't check the return code. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2.c')
-rw-r--r--drivers/infiniband/hw/amso1100/c2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 9e7bd94b958a..27fe242ed435 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -1155,7 +1155,8 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
goto bail10;
}
- c2_register_device(c2dev);
+ if (c2_register_device(c2dev))
+ goto bail10;
return 0;