On Wed, Sep 10, 2014 at 07:26:32AM -0400, nick wrote: > On 14-09-10 12:49 AM, Valdis.Kletnieks@xxxxxx wrote: [snip] > > Like this one - it's *still* wrong. Because.... > > > > From: Nicholas Krause <xerofoify@xxxxxxxxx> > > Date: Tue, 9 Sep 2014 21:12:56 -0400 > > > > You reposted the same broken patch again. [snip] > Here is the correct patch. > Nick > >From ad55b627241203a380dd9c708a4feae98446f85f Mon Sep 17 00:00:00 2001 > From: Nicholas Krause <xerofoify@xxxxxxxxx> > Date: Tue, 9 Sep 2014 21:12:56 -0400 > Subject: [PATCH] staging: Fix NULL check for allocating the skb in > r8192E_firmware.c > > This patch checks in the loop of the function, fw_download_code if > a allocated skb is NULL. If the skb is NULL then we first free the > allocated skbs in the queue of this function with skb_queue_purge > in order to free the allocated skbs. After the freeing of the queue > we break out of the do/while of this function as we need to run > write_nic_byte in order to activate parts of the network card's > driver. > > Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx> > --- > drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c > index 1a95d1f..a251414 100644 > --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c > +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c > @@ -61,6 +61,10 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, > } > > skb = dev_alloc_skb(frag_length + 4); > + if (skb == NULL) { > + skb_queue_purge(&priv->rtllib->skb_waitQ[TXCMD_QUEUE]); > + break; > + } > memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev)); > tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); > tcb_desc->queue_index = TXCMD_QUEUE; I'll save Valdis the trouble here. This is still wrong. It's *identical* to the last one you sent. Bit for bit. Again, you've lost track of even the most fundamental details ("Am I sending the thing I wanted to?") Doing this once or twice, occasionally, is OK. Everyone makes mistakes every so often. Doing it repeatedly, on a nearly daily basis, over a period of a couple of months, is simply unacceptable. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Our so-called leaders speak/with words they try to jail ya/ --- They subjugate the meek/but it's the rhetoric of failure.
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies