diff options
author | Jakob Koschel <jakobkoschel@gmail.com> | 2022-03-19 22:54:47 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-03-22 18:52:21 +0100 |
commit | fa3416509605621b8db263b0ee9aaf85285aee4b (patch) | |
tree | 47d15a8049cb66e3034a604c7fc8012fe5058df4 /drivers/acpi/apei | |
parent | Merge tag 'acpi-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ra... (diff) | |
download | linux-fa3416509605621b8db263b0ee9aaf85285aee4b.tar.xz linux-fa3416509605621b8db263b0ee9aaf85285aee4b.zip |
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>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/apei-base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index c7fdb12c3310..33b7fbbeda82 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c @@ -319,7 +319,7 @@ repeat: 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; |