mirror of https://github.com/torvalds/linux.git
acpi/hmat: Return when generic target is updated
With the current code flow, once the generic target is updated target->registered is set and the remaining code is skipped. So return immediately instead of going through the checks and then skip. Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20251105235115.85062-2-dave.jiang@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
parent
2230c4bdc4
commit
15e1426788
|
|
@ -888,12 +888,13 @@ static void hmat_register_target(struct memory_target *target)
|
||||||
* Register generic port perf numbers. The nid may not be
|
* Register generic port perf numbers. The nid may not be
|
||||||
* initialized and is still NUMA_NO_NODE.
|
* initialized and is still NUMA_NO_NODE.
|
||||||
*/
|
*/
|
||||||
mutex_lock(&target_lock);
|
scoped_guard(mutex, &target_lock) {
|
||||||
if (*(u16 *)target->gen_port_device_handle) {
|
if (*(u16 *)target->gen_port_device_handle) {
|
||||||
hmat_update_generic_target(target);
|
hmat_update_generic_target(target);
|
||||||
target->registered = true;
|
target->registered = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mutex_unlock(&target_lock);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Skip offline nodes. This can happen when memory
|
* Skip offline nodes. This can happen when memory
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue