Commit efc273ce authored by Vitaly Osipov's avatar Vitaly Osipov Committed by Greg Kroah-Hartman

staging: rtl8712: fix kmalloc parameters

After the commit 91d435fe replaced _malloc with kmalloc, smatch picked up a
couple of new warnings. This fixes warnings:

warn: struct type mismatch 'writePTM_parm vs setdig_parm'
warn: struct type mismatch 'writePTM_parm vs setra_parm'

The difference is u8 vs unsigned char.
Signed-off-by: default avatarVitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f30f2c2d
...@@ -350,7 +350,7 @@ u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type) ...@@ -350,7 +350,7 @@ u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type)
ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (ph2c == NULL) if (ph2c == NULL)
return _FAIL; return _FAIL;
pwriteptmparm = kmalloc(sizeof(struct setdig_parm), GFP_ATOMIC); pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC);
if (pwriteptmparm == NULL) { if (pwriteptmparm == NULL) {
kfree((u8 *) ph2c); kfree((u8 *) ph2c);
return _FAIL; return _FAIL;
...@@ -370,7 +370,7 @@ u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type) ...@@ -370,7 +370,7 @@ u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type)
ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (ph2c == NULL) if (ph2c == NULL)
return _FAIL; return _FAIL;
pwriteptmparm = kmalloc(sizeof(struct setra_parm), GFP_ATOMIC); pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC);
if (pwriteptmparm == NULL) { if (pwriteptmparm == NULL) {
kfree((u8 *) ph2c); kfree((u8 *) ph2c);
return _FAIL; return _FAIL;
......
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