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