Staging: rtl8188eu: Replace rtw_zmalloc with kzalloc.
authorElena Oat <oat.elena@gmail.com>
Sun, 9 Mar 2014 12:04:40 +0000 (14:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 17:46:37 +0000 (10:46 -0700)
This patch replaces rtw_zmalloc with kzalloc in function
rtw_setstandby_cmd. There are no locks, hence GFP_KERNEL flag is used.

Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c

index 8c0d2eb..8c54881 100644 (file)
@@ -393,13 +393,13 @@ u8 rtw_setstandby_cmd(struct adapter *padapter, uint action)
        u8 ret = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                ret = _FAIL;
                goto exit;
        }
 
-       psetusbsuspend = (struct usb_suspend_parm *)rtw_zmalloc(sizeof(struct usb_suspend_parm));
+       psetusbsuspend = kzalloc(sizeof(struct usb_suspend_parm), GFP_KERNEL);
        if (psetusbsuspend == NULL) {
                kfree(ph2c);
                ret = _FAIL;