[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5B08M6n0rXfgZkVNb-0awVQdJ56aMokimCunVsjg03AZg@mail.gmail.com>
Date: Fri, 5 Sep 2014 17:32:40 -0300
From: Fabio Estevam <festevam@...il.com>
To: Frank Li <Frank.Li@...escale.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Duan Fugang-B38611 <b38611@...escale.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 1/1] net: fec: change data structure to support multiqueue
On Fri, Sep 5, 2014 at 4:39 PM, Frank Li <Frank.Li@...escale.com> wrote:
> + txq = kzalloc(sizeof(*txq), GFP_KERNEL);
> + if (!txq)
> + return -ENOMEM;
> + fep->tx_queue[0] = txq;
> +
> + rxq = kzalloc(sizeof(*rxq), GFP_KERNEL);
> + if (!rxq) {
> + kfree(txq);
> + return -ENOMEM;
> + }
....
> /* Allocate memory for buffer descriptors. */
> - cbd_base = dma_alloc_coherent(NULL, bd_size, &fep->bd_dma,
> + cbd_base = dma_alloc_coherent(NULL, bd_size, &bd_dma,
> GFP_KERNEL);
> if (!cbd_base)
> return -ENOMEM;
You should kfree txq and rxq before returning here.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists