mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
ACPI, APEI: Use the correct variable for sizeof()
While the original code is valid, it is not the obvious choice for the sizeof() call and in preparation to limit the scope of the list iterator variable the sizeof should be changed to the size of the variable being allocated. Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
242ba6656d
commit
fa34165096
|
|
@ -319,7 +319,7 @@ static int apei_res_add(struct list_head *res_list,
|
|||
if (res_ins)
|
||||
list_add(&res_ins->list, res_list);
|
||||
else {
|
||||
res_ins = kmalloc(sizeof(*res), GFP_KERNEL);
|
||||
res_ins = kmalloc(sizeof(*res_ins), GFP_KERNEL);
|
||||
if (!res_ins)
|
||||
return -ENOMEM;
|
||||
res_ins->start = start;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user