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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;