Skip to content

Commit

Permalink
[PATCH] ehea: Nullpointer dereferencation fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Klein authored and Jeff Garzik committed Nov 6, 2006
1 parent d1ed6a3 commit 1b5135d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1b5135d

Please sign in to comment.