Hi, On Tue, Oct 2, 2012 at 8:21 PM, John W. Linville <linville@xxxxxxxxxxxxx> wrote: > From: "John W. Linville" <linville@xxxxxxxxxxxxx> > > dma_map_single can fail, so it's return value needs to be checked and > handled accordingly. Failure to do so is akin to failing to check the > return from a kmalloc. > > http://linuxdriverproject.org/mediawiki/index.php/DMA_Mapping_Error_Analysis > > Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx> > Cc: Gertjan van Wingerde <gwingerde@xxxxxxxxx> > Cc: Ivo van Doorn <IvDoorn@xxxxxxxxx> > --- > Compile tested only...can the experts take a look at how the failures > are handled? <snip> > diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h > index 0751b35..50ff18d 100644 > --- a/drivers/net/wireless/rt2x00/rt2x00.h > +++ b/drivers/net/wireless/rt2x00/rt2x00.h > @@ -605,8 +605,8 @@ struct rt2x00lib_ops { > struct txentry_desc *txdesc); > void (*write_tx_data) (struct queue_entry *entry, > struct txentry_desc *txdesc); > - void (*write_beacon) (struct queue_entry *entry, > - struct txentry_desc *txdesc); > + int (*write_beacon) (struct queue_entry *entry, > + struct txentry_desc *txdesc); > void (*clear_beacon) (struct queue_entry *entry); > int (*get_tx_data_len) (struct queue_entry *entry); The only thing I am missing in the commit, is the check for the return value when write_beacon is being called. Ivo -- 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