All of lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dotan Barak
	<dotanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH for-next 6/6] net/mlx4_core: Free ICM table in case of error
Date: Wed, 11 Jul 2012 18:33:45 +0300	[thread overview]
Message-ID: <1342020825-18878-7-git-send-email-ogerlitz@mellanox.com> (raw)
In-Reply-To: <1342020825-18878-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

From: Dotan Barak <dotanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

In mlx4_init_icm_table, free the allocated table if we failed to allocate
memory to its entries.

Signed-off-by: Dotan Barak <dotanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Reviewed-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/net/ethernet/mellanox/mlx4/icm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c
index a9ade1c..88b7b3e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/icm.c
+++ b/drivers/net/ethernet/mellanox/mlx4/icm.c
@@ -413,6 +413,8 @@ err:
 			mlx4_free_icm(dev, table->icm[i], use_coherent);
 		}
 
+	kfree(table->icm);
+
 	return -ENOMEM;
 }
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2012-07-11 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 15:33 [PATCH for-next 0/6] batch of fixes for 3.6 Or Gerlitz
     [not found] ` <1342020825-18878-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-07-11 15:33   ` [PATCH for-next 1/6] IB/mthca: Events received for non-existent QPs should generate a warning Or Gerlitz
     [not found]     ` <1342020825-18878-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-07-11 15:40       ` Roland Dreier
     [not found]         ` <CAL1RGDUdUm2=UR4N4McTFJ7S9YJPzhH_V4Eym3DFjj5fzXgpYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-11 15:57           ` Or Gerlitz
     [not found]             ` <4FFDA250.9090701-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2012-07-11 16:01               ` Roland Dreier
2012-07-11 15:33   ` [PATCH for-next 2/6] IB/mthca: Fill in the attribute sq_sig_type value in query QP Or Gerlitz
2012-07-11 15:33   ` [PATCH for-next 3/6] IB/mlx4: Fill the masked_atomic_cap attribute in query device Or Gerlitz
2012-07-11 15:33   ` [PATCH for-next 4/6] net/mlx4_core: Remove double function declarations Or Gerlitz
2012-07-11 15:33   ` [PATCH for-next 5/6] IB/cm: Destroy idr as part of the module init error flow Or Gerlitz
2012-07-11 15:33   ` Or Gerlitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342020825-18878-7-git-send-email-ogerlitz@mellanox.com \
    --to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=dotanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.