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>
exit:
- kfree((u8 *)pwep);
+ kfree(pwep);
return ret;
}
ret = wpa_set_encryption(dev, param, param_len);
exit:
- kfree((u8 *)param);
+ kfree(param);
return ret;
}
if (copy_from_user(param, p->pointer, p->length))
{
- kfree((u8 *)param);
+ kfree(param);
ret = -EFAULT;
goto out;
}
if (ret == 0 && copy_to_user(p->pointer, param, p->length))
ret = -EFAULT;
- kfree((u8 *)param);
+ kfree(param);
out:
}
exit:
- kfree((u8 *)pwep);
+ kfree(pwep);
return ret;
if (copy_from_user(param, p->pointer, p->length))
{
- kfree((u8 *)param);
+ kfree(param);
ret = -EFAULT;
goto out;
}
ret = -EFAULT;
- kfree((u8 *)param);
+ kfree(param);
out: