Search Linux Wireless

Re: [PATCH 1/2] ath9k: Check for pci_map_single() errors

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

 



On Tue, Dec 02, 2008 at 06:21:05PM -0800, Luis Rodriguez wrote:
> pci_map_single() can fail so detect those errors with
> pci_dma_mapping_error() and deal with them accordingly.
> 
> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
> ---
>  drivers/net/wireless/ath9k/beacon.c |   16 +++++++++++++++-
>  drivers/net/wireless/ath9k/recv.c   |   15 +++++++++++++++
>  drivers/net/wireless/ath9k/xmit.c   |   23 +++++++++++++++++++++--
>  3 files changed, 51 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
> index e80d9b9..a393761 100644
> --- a/drivers/net/wireless/ath9k/beacon.c
> +++ b/drivers/net/wireless/ath9k/beacon.c
> @@ -192,6 +192,13 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
>                 pci_map_single(sc->pdev, skb->data,
>                                skb->len,
>                                PCI_DMA_TODEVICE);
> +       if (unlikely(pci_dma_mapping_error(sc->pdev, bf->bf_buf_addr))) {
> +               dev_kfree_skb(skb);

Bleh, these are all wrong, they should be dev_kfree_skb_any(skb).

  Luis

--
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