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 <[EMAIL PROTECTED]>
> ---
>  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

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to