Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: storage: ene_ub6250: Remove unnecessary cast in kfree

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>

authored by

Amitoj Kaur Chawla and committed by
Greg Kroah-Hartman
e6533e87 d078c6e4

+2 -2
+2 -2
drivers/usb/storage/ene_ub6250.c
··· 1067 1067 ms_lib_clear_pagemap(info); /* (pdx)->MS_Lib.pagemap memset 0 in ms.h */ 1068 1068 1069 1069 if (info->MS_Lib.blkpag) { 1070 - kfree((u8 *)(info->MS_Lib.blkpag)); /* Arnold test ... */ 1070 + kfree(info->MS_Lib.blkpag); /* Arnold test ... */ 1071 1071 info->MS_Lib.blkpag = NULL; 1072 1072 } 1073 1073 1074 1074 if (info->MS_Lib.blkext) { 1075 - kfree((u8 *)(info->MS_Lib.blkext)); /* Arnold test ... */ 1075 + kfree(info->MS_Lib.blkext); /* Arnold test ... */ 1076 1076 info->MS_Lib.blkext = NULL; 1077 1077 } 1078 1078 }