]> Git Repo - linux.git/commit
Staging: rspiusb: use NULL virtual address instead of a bogus one
authorPete Zaitcev <[email protected]>
Wed, 10 Jun 2009 20:44:14 +0000 (14:44 -0600)
committerGreg Kroah-Hartman <[email protected]>
Sun, 12 Jul 2009 20:21:44 +0000 (13:21 -0700)
commitaea0d43bdec32cc4a7ba53d6c82616de3964357a
treea242512399606fe497c2f6977e17d4ffccec6945
parentf408adeb517e1b17102acd889251d5ab60c1fb88
Staging: rspiusb: use NULL virtual address instead of a bogus one

The main problem here is that I just cannot see how this could ever
be correct:

usb_fill_bulk_urb(pdx->PixelUrb[frameInfo][i], pdx->udev, epAddr,
(dma_addr_t *) sg_dma_address(&pdx->sgl[frameInfo][i]),
  sg_dma_len(&pdx->sgl[frameInfo][i]),

You cannot take a DMA address, cast it to a _pointer to_ a DMA address,
and then regard it as a virtual address of the transfer buffer.
However, finding the right virtual address was too hard for me,
so I just stubbed it with NULL. At least usbmon won't oops then
(it will not show any data but it's better than crashing).

Also, too big a buffer was allocated elsewhere.

And since we're at it, drop clearly unnecessary usb_buffer_alloc too,
leaving it where it may be useful.

Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/rspiusb/rspiusb.c
This page took 0.051137 seconds and 4 git commands to generate.