summaryrefslogtreecommitdiff
path: root/drivers/xen/xen-acpi-processor.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-08-28 17:41:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-08-28 17:41:30 -0700
commit6383cb42ac01e6fb9ef6a035a2288786e61bdddf (patch)
tree2a91917473b5f7502e82559980cd82c570ed26ff /drivers/xen/xen-acpi-processor.c
parent542034175ca715d28522a59c1f88a58349f2765c (diff)
parentf8941e6c4c712948663ec5d7bbb546f1a0f4e3f6 (diff)
Merge tag 'for-linus-6.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross: - a bunch of minor cleanups - a patch adding irqfd support for virtio backends running as user daemon supporting Xen guests * tag 'for-linus-6.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: privcmd: Add support for irqfd xen/xenbus: Avoid a lockdep warning when adding a watch xen: Fix one kernel-doc comment xen: xenbus: Use helper function IS_ERR_OR_NULL() xen: Switch to use kmemdup() helper xen-pciback: Remove unused function declarations x86/xen: Make virt_to_pfn() a static inline xen: remove a confusing comment on auto-translated guest I/O xen/evtchn: Remove unused function declaration xen_set_affinity_evtchn()
Diffstat (limited to 'drivers/xen/xen-acpi-processor.c')
-rw-r--r--drivers/xen/xen-acpi-processor.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
index 9cb61db67efd..296703939846 100644
--- a/drivers/xen/xen-acpi-processor.c
+++ b/drivers/xen/xen-acpi-processor.c
@@ -473,11 +473,8 @@ static int xen_upload_processor_pm_data(void)
if (!_pr)
continue;
- if (!pr_backup) {
- pr_backup = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL);
- if (pr_backup)
- memcpy(pr_backup, _pr, sizeof(struct acpi_processor));
- }
+ if (!pr_backup)
+ pr_backup = kmemdup(_pr, sizeof(*_pr), GFP_KERNEL);
(void)upload_pm_data(_pr);
}