bnx2x: Memory clean up on failure
authorEilon Greenstein <eilong@broadcom.com>
Thu, 12 Feb 2009 08:37:57 +0000 (08:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Feb 2009 07:31:47 +0000 (23:31 -0800)
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x_init.h

index 961db4916f259277fa3c2c012f690b665ccde53d..021438f8134195aa36ca9e2f8f250cfb8c6e990d 100644 (file)
@@ -274,6 +274,9 @@ static void bnx2x_init_wr_wb(struct bnx2x *bp, u32 addr, const u32 *data,
                rc = bnx2x_gunzip(bp, (u8 *)data, len);
                if (rc) {
                        BNX2X_ERR("gunzip failed ! rc %d\n", rc);
+#ifdef __BIG_ENDIAN
+                       kfree(temp);
+#endif
                        return;
                }
                len = bp->gunzip_outlen;