From: Wambui Karuga Date: Tue, 15 Oct 2019 11:26:37 +0000 (+0300) Subject: staging: rtl8723bs: remove casts to pointers in kfree X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f57ff0a9b806ebce507e699e4a4ee2c6f06178fc;p=linux.git staging: rtl8723bs: remove casts to pointers in kfree Remove unnecessary casts in pointer types passed to kfree. Signed-off-by: Wambui Karuga Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20191015112637.20824-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 3030ae5b6b6d6..71fcb466019a9 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -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; }