Search Linux Wireless

Re: [PATCH] rtlwifi: Hopefully not mangled this time -- Handle previous allocation failures when freeing device memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon,

It's still mangled.

There's a file in Documentation that details how to get the best out of mailers.

I'm guessing you're using some variant of Microsoft Outlook (as your
mail is going through an Exchange server) which, IIRC simply refuses
not to mangle patches.

Also, remember that the subject of the email (everything except the
[PATCH] at the start) becomes part of the commit log, so if you want
to mark that a patch is being re-sent, do it after the '---' line in
the commit log, and change the [PATCH] in the subject to [PATCH v2] or
whatever.

Thanks,

Julian Calaby

On Wed, Feb 8, 2012 at 10:23, Simon Graham
<simon.graham@xxxxxxxxxxxxxxxxxxx> wrote:
> Handle previous allocation failures when freeing device memory
>
> Signed-off-by: Simon Graham <simon.graham@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/rtlwifi/pci.c |   24 ++++++++++++++----------
>  1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/pci.c
> b/drivers/net/wireless/rtlwifi/pci.c
> index c5f6a32..fb84707 100644
> --- a/drivers/net/wireless/rtlwifi/pci.c
> +++ b/drivers/net/wireless/rtlwifi/pci.c
> @@ -1148,10 +1148,12 @@ static void _rtl_pci_free_tx_ring(struct
> ieee80211_hw *hw,
>                ring->idx = (ring->idx + 1) % ring->entries;
>        }
>
> -       pci_free_consistent(rtlpci->pdev,
> -                           sizeof(*ring->desc) * ring->entries,
> -                           ring->desc, ring->dma);
> -       ring->desc = NULL;
> +       if (ring->desc) {
> +               pci_free_consistent(rtlpci->pdev,
> +                               sizeof(*ring->desc) * ring->entries,
> +                               ring->desc, ring->dma);
> +               ring->desc = NULL;
> +       }
>  }
>
>  static void _rtl_pci_free_rx_ring(struct rtl_pci *rtlpci)
> @@ -1175,13 +1177,14 @@ static void _rtl_pci_free_rx_ring(struct rtl_pci
> *rtlpci)
>                        kfree_skb(skb);
>                }
>
> -               pci_free_consistent(rtlpci->pdev,
> -
> sizeof(*rtlpci->rx_ring[rx_queue_idx].
> -                                          desc) * rtlpci->rxringcount,
> -                                   rtlpci->rx_ring[rx_queue_idx].desc,
> -                                   rtlpci->rx_ring[rx_queue_idx].dma);
> -               rtlpci->rx_ring[rx_queue_idx].desc = NULL;
> +               if (rtlpci->rx_ring[rx_queue_idx].desc) {
> +                       pci_free_consistent(rtlpci->pdev,
> +
> sizeof(*rtlpci->rx_ring[rx_queue_idx].
> +                                              desc) *
> rtlpci->rxringcount,
> +
> rtlpci->rx_ring[rx_queue_idx].desc,
> +
> rtlpci->rx_ring[rx_queue_idx].dma);
> +                       rtlpci->rx_ring[rx_queue_idx].desc = NULL;
> +               }
>        }
>  }
>
> --
> 1.7.8.3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux