Skip to content
Commit 16fe6ec4 authored by Li Ming's avatar Li Ming Committed by Dave Jiang
Browse files

cxl/core: Use guard() to drop the goto pattern of cxl_dpa_free()



cxl_dpa_free() has a goto pattern to call up_write() for cxl_dpa_rwsem,
it can be removed by using a guard() to replace the down_write() and
up_write().

Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarAlison Schofield <alison.schofield@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Acked-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
Signed-off-by: default avatarLi Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/20250221012453.126366-5-ming.li@zohomail.com


Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
parent a58afda8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment