diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2006-11-03 16:47:20 (GMT) |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-11-06 07:55:07 (GMT) |
commit | 1b5135d9b922fdcf46e1e7383167d93d42635fb4 (patch) | |
tree | 9e76b9f9a4648865cb6ae8e54bb95a0ab3690253 /drivers | |
parent | d1ed6a3ea10aa7b199c434f6ffd1b6761896567a (diff) | |
download | linux-1b5135d9b922fdcf46e1e7383167d93d42635fb4.tar.xz |
[PATCH] ehea: Nullpointer dereferencation fix
Fix: Must check for nullpointer before dereferencing it - not afterwards.
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ehea/ehea_qmr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 3e18623..1615593 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c @@ -209,11 +209,11 @@ int ehea_destroy_cq(struct ehea_cq *cq) { u64 adapter_handle, hret; - adapter_handle = cq->adapter->handle; - if (!cq) return 0; + adapter_handle = cq->adapter->handle; + /* deregister all previous registered pages */ hret = ehea_h_free_resource(adapter_handle, cq->fw_handle); if (hret != H_SUCCESS) { |