usb: storage: ene_ub6250: Remove unnecessary cast in kfree
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Tue, 26 Jan 2016 18:42:23 +0000 (00:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 21:48:12 +0000 (13:48 -0800)
Remove unnecassary casts in the argument to kfree.

Found using Coccinelle. The semantic patch used to find this is as follows:

//<smpl>
@@
type T;
expression *f;
@@

- kfree((T *)(f));
+ kfree(f);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/ene_ub6250.c

index f3cf4ce..d3a17c6 100644 (file)
@@ -1067,12 +1067,12 @@ static void ms_lib_free_writebuf(struct us_data *us)
        ms_lib_clear_pagemap(info); /* (pdx)->MS_Lib.pagemap memset 0 in ms.h */
 
        if (info->MS_Lib.blkpag) {
-               kfree((u8 *)(info->MS_Lib.blkpag));  /* Arnold test ... */
+               kfree(info->MS_Lib.blkpag);  /* Arnold test ... */
                info->MS_Lib.blkpag = NULL;
        }
 
        if (info->MS_Lib.blkext) {
-               kfree((u8 *)(info->MS_Lib.blkext));  /* Arnold test ... */
+               kfree(info->MS_Lib.blkext);  /* Arnold test ... */
                info->MS_Lib.blkext = NULL;
        }
 }