diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2006-11-03 11:47:20 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-11-06 02:55:07 -0500 |
commit | 1b5135d9b922fdcf46e1e7383167d93d42635fb4 (patch) | |
tree | 9e76b9f9a4648865cb6ae8e54bb95a0ab3690253 /drivers/net/ehea | |
parent | d1ed6a3ea10aa7b199c434f6ffd1b6761896567a (diff) |
[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/net/ehea')
-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 3e1862326c88..161559315c0e 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) | |||
209 | { | 209 | { |
210 | u64 adapter_handle, hret; | 210 | u64 adapter_handle, hret; |
211 | 211 | ||
212 | adapter_handle = cq->adapter->handle; | ||
213 | |||
214 | if (!cq) | 212 | if (!cq) |
215 | return 0; | 213 | return 0; |
216 | 214 | ||
215 | adapter_handle = cq->adapter->handle; | ||
216 | |||
217 | /* deregister all previous registered pages */ | 217 | /* deregister all previous registered pages */ |
218 | hret = ehea_h_free_resource(adapter_handle, cq->fw_handle); | 218 | hret = ehea_h_free_resource(adapter_handle, cq->fw_handle); |
219 | if (hret != H_SUCCESS) { | 219 | if (hret != H_SUCCESS) { |