On Mon, 2011-06-06 at 14:55 -0700, Greg KH wrote: > On Tue, Jun 07, 2011 at 12:37:37AM +0530, anish wrote: > > From: anish kumar <anish198519851985@xxxxxxxxx> > > Replace kmalloc with local variables as it was un-necessary and > > also removed the redudant code after this change. > SPI data, like USB data, has to come from kmalloced data, not from the > stack, or bad things can, and will, happen. Perhaps just add a comment like: + u8 *tx = kmalloc(2, GFP_KERNEL); /* can't be on stack */ It might be better to do a single kmalloc(4) than 2 separate kmalloc(2)'s. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel