Commit f57ff0a9 authored by Wambui Karuga's avatar Wambui Karuga Committed by Greg Kroah-Hartman

staging: rtl8723bs: remove casts to pointers in kfree

Remove unnecessary casts in pointer types passed to kfree.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/20191015112637.20824-1-wambui.karugax@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbecf7de
......@@ -2155,7 +2155,7 @@ sint rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
psetauthparm = rtw_zmalloc(sizeof(struct setauth_parm));
if (!psetauthparm) {
kfree((unsigned char *)pcmd);
kfree(pcmd);
res = _FAIL;
goto exit;
}
......@@ -2238,7 +2238,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s
if (enqueue) {
pcmd = rtw_zmalloc(sizeof(struct cmd_obj));
if (!pcmd) {
kfree((unsigned char *)psetkeyparm);
kfree(psetkeyparm);
res = _FAIL; /* try again */
goto exit;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment