Skip to contentSkip to conversation

Staging: ks7010: Drop memory allocation cast.

PATCH New Sandhya Bankar 1 participant 1 message Sep 18, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: ks7010: Drop memory allocation cast.

Drop cast on the result of kzalloc.

The semantic patch that makes this change is as follows:

@@
type T;
@@
- (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))

---
Changes in v2:
* Correcting the file permission issue.

 drivers/staging/ks7010/ks7010_sdio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +1 -2
index f9aec4f..c40e6c5 100644
@@ -1147,8 +1147,7 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 		/* send stop request to MAC */
 		{
 			struct hostif_stop_request_t *pp;
-			pp = (struct hostif_stop_request_t *)
-			    kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
+			pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
 			if (!pp) {
 				DPRINTK(3, "allocate memory failed..\n");
 				return;	/* to do goto ni suru */
Signature · 1 line
1.7.1