]> git.itanic.dy.fi Git - linux-stable/commit
cxl/hdm: Fix double allocation of @cxlhdm
authorDan Williams <dan.j.williams@intel.com>
Tue, 4 Apr 2023 22:34:12 +0000 (15:34 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 4 Apr 2023 22:34:12 +0000 (15:34 -0700)
commit82f0832af26a30ae5f21b335c5f68b538e710c29
treeccbaca895b8b3908a9618f530d6d6c03c81c79b4
parenteeac8ede17557680855031c6f305ece2378af326
cxl/hdm: Fix double allocation of @cxlhdm

devm_cxl_setup_emulated_hdm() reallocates an instance of @cxlhdm that
was already allocated at the start of devm_cxl_setup_hdm(). Only one is
needed and devm_cxl_setup_emulated_hdm() does not do enough to warrant
being an explicit helper.

Fixes: 4474ce565ee4 ("cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders")
Tested-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/167703067936.185722.7908921750127154779.stgit@dwillia2-xfh.jf.intel.com
Link: https://lore.kernel.org/r/168012574357.221280.5001364964799725366.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/hdm.c