Staging: ks7010: Drop memory allocation cast.
authorSandhya Bankar <bankarsandhya512@gmail.com>
Sat, 17 Sep 2016 23:25:26 +0000 (04:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Sep 2016 10:38:27 +0000 (12:38 +0200)
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\)(...))

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c

index f7ed8db..25ad43d 100644 (file)
@@ -1140,8 +1140,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 */