Skip to contentSkip to conversation

staging: emxx_udc: Remove unneeded cast

PATCH-next Christopher Diaz Riveros 1 participant 1 message Feb 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Fix Coccinelle alert:

drivers/staging//emxx_udc/emxx_udc.c:2689:19-21: WARNING: casting value returned by memory allocation function to (u8 *) is useless.

This issue was detected by using the Coccinelle software.

---
 drivers/staging/emxx_udc/emxx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/emxx_udc/emxx_udc.c +1 -1
index 7517001fb8f0..ad69a1e536a7 100644
@@ -2686,7 +2686,7 @@ static int nbu2ss_ep_queue(
 
 	if (req->unaligned) {
 		if (!ep->virt_buf)
-			ep->virt_buf = (u8 *)dma_alloc_coherent(
+			ep->virt_buf = dma_alloc_coherent(
 				NULL, PAGE_SIZE,
 				&ep->phys_buf, GFP_ATOMIC | GFP_DMA);
 		if (ep->epnum > 0)  {
Signature · 1 line
2.16.2