Commit fa341650 authored by Jakob Koschel's avatar Jakob Koschel Committed by Rafael J. Wysocki

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: default avatarJakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 242ba665
...@@ -319,7 +319,7 @@ static int apei_res_add(struct list_head *res_list, ...@@ -319,7 +319,7 @@ static int apei_res_add(struct list_head *res_list,
if (res_ins) if (res_ins)
list_add(&res_ins->list, res_list); list_add(&res_ins->list, res_list);
else { else {
res_ins = kmalloc(sizeof(*res), GFP_KERNEL); res_ins = kmalloc(sizeof(*res_ins), GFP_KERNEL);
if (!res_ins) if (!res_ins)
return -ENOMEM; return -ENOMEM;
res_ins->start = start; res_ins->start = start;
......
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