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

dj: memory scribble in logi_dj

Allocate a structure not a pointer to it !

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
8a55ade7 cb4f9a29

+2 -2
+2 -2
drivers/hid/hid-logitech-dj.c
··· 439 439 struct dj_report *dj_report; 440 440 int retval; 441 441 442 - dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL); 442 + dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL); 443 443 if (!dj_report) 444 444 return -ENOMEM; 445 445 dj_report->report_id = REPORT_ID_DJ_SHORT; ··· 456 456 struct dj_report *dj_report; 457 457 int retval; 458 458 459 - dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL); 459 + dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL); 460 460 if (!dj_report) 461 461 return -ENOMEM; 462 462 dj_report->report_id = REPORT_ID_DJ_SHORT;