[PATCH] ced1401: remove useless value cast on kmalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Casting value returned by k[cmz]alloc to (struct page * *) is useless.

Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci

Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

 drivers/staging/ced1401/ced_ioc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-next.orig/drivers/staging/ced1401/ced_ioc.c	2012-10-27 11:23:51.885567926 +0800
+++ linux-next/drivers/staging/ced1401/ced_ioc.c	2012-10-27 11:25:39.049570466 +0800
@@ -697,8 +697,7 @@ static int SetArea(DEVICE_EXTENSION * pd
 		return -EFAULT;	// ...then we are done
 
 	// Now allocate space to hold the page pointer and virtual address pointer tables
-	pPages =
-	    (struct page **)kmalloc(len * sizeof(struct page *), GFP_KERNEL);
+	pPages = kmalloc(len * sizeof(struct page *), GFP_KERNEL);
 	if (!pPages) {
 		iReturn = U14ERR_NOMEMORY;
 		goto error;
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux