mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'for-7.4/cxl-fixes' into cxl-for-next
cxl/acpi: Check ACPI companion before use
This commit is contained in:
commit
d27812db9d
|
|
@ -885,13 +885,17 @@ static int pair_cxl_resource(struct device *dev, void *data)
|
|||
|
||||
static int cxl_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
int rc;
|
||||
struct cxl_cfmws_context ctx;
|
||||
struct acpi_device *adev;
|
||||
struct resource *cxl_res;
|
||||
struct cxl_root *cxl_root;
|
||||
struct cxl_port *root_port;
|
||||
struct device *host = &pdev->dev;
|
||||
struct acpi_device *adev = ACPI_COMPANION(host);
|
||||
struct cxl_cfmws_context ctx;
|
||||
int rc;
|
||||
|
||||
adev = ACPI_COMPANION(host);
|
||||
if (!adev)
|
||||
return -ENODEV;
|
||||
|
||||
device_lock_set_class(&pdev->dev, &cxl_root_key);
|
||||
rc = devm_add_action_or_reset(&pdev->dev, cxl_acpi_lock_reset_class,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user