Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: fix kmalloc parameters

After the commit 91d435f 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: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vitaly Osipov and committed by
Greg Kroah-Hartman
efc273ce f30f2c2d

+2 -2
+2 -2
drivers/staging/rtl8712/rtl871x_cmd.c
··· 350 350 ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC); 351 351 if (ph2c == NULL) 352 352 return _FAIL; 353 - pwriteptmparm = kmalloc(sizeof(struct setdig_parm), GFP_ATOMIC); 353 + pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC); 354 354 if (pwriteptmparm == NULL) { 355 355 kfree((u8 *) ph2c); 356 356 return _FAIL; ··· 370 370 ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC); 371 371 if (ph2c == NULL) 372 372 return _FAIL; 373 - pwriteptmparm = kmalloc(sizeof(struct setra_parm), GFP_ATOMIC); 373 + pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC); 374 374 if (pwriteptmparm == NULL) { 375 375 kfree((u8 *) ph2c); 376 376 return _FAIL;