diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2007-01-22 12:52:20 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-23 00:59:20 -0500 |
commit | 061bf3cdba753ae7b52fba8cc324d81adac77696 (patch) | |
tree | 71a4d892ffe50f8f016e8afacc55e8f58bfcc269 /drivers/net/ehea | |
parent | 9f6d55d0846dd8628fd3eac15be377c4d3493c3e (diff) | |
download | talos-obmc-linux-061bf3cdba753ae7b52fba8cc324d81adac77696.tar.gz talos-obmc-linux-061bf3cdba753ae7b52fba8cc324d81adac77696.zip |
ehea: Fixed wrong dereferencation
Not only check the pointer against 0 but also the dereferenced value
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 39ad9f73d1ec..be10a3a26b5b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -39,7 +39,7 @@ #include <asm/io.h> #define DRV_NAME "ehea" -#define DRV_VERSION "EHEA_0043" +#define DRV_VERSION "EHEA_0044" #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 83fa32f72398..49f669c4b019 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2471,14 +2471,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", NULL); - if (!adapter_handle) { + if (adapter_handle) + adapter->handle = *adapter_handle; + + if (!adapter->handle) { dev_err(&dev->ofdev.dev, "failed getting handle for adapter" " '%s'\n", dev->ofdev.node->full_name); ret = -ENODEV; goto out_free_ad; } - adapter->handle = *adapter_handle; adapter->pd = EHEA_PD_ID; dev->ofdev.dev.driver_data = adapter; |