]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: fusb300_udc: fix compile warnings
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 5 Jul 2011 12:59:05 +0000 (15:59 +0300)
committerFelipe Balbi <balbi@ti.com>
Tue, 5 Jul 2011 13:41:15 +0000 (16:41 +0300)
commit962c81b2c469fb2f14bab46054a58b5dad6b7375
treee2d7325317c7e906272df61348b87b610cae0df4
parentcf1678069dbf245be5fc7647c7747fb0597c1271
usb: gadget: fusb300_udc: fix compile warnings

- remove pointer u32 abuse in fusb300_fill_idma_prdtbl().
  It is assigned the dma_addr to a pointer and then back.
  Poor families may have to recycle variables but we don't

- don't free req.buf in error case. We don't do it in the
  ok case so it is probably wrong to do it in error case.

- return in error case. There is no reason to continue
  without data and performing ops on an invalid pointer.

- The if (d) statement is bogus since an invalid DMA pointer
  is ~0 on some architecutres. And since we return for the
  invalid case we don't need it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/fusb300_udc.c