Commit 61243c03 authored by Laurentiu Tudor's avatar Laurentiu Tudor Committed by Greg Kroah-Hartman
Browse files

bus: fsl-mc: add back accidentally dropped error check



A previous patch accidentally dropped an error check, so add it back.

Fixes: aef85b56 ("bus: fsl-mc: MC control registers are not always available")
Signed-off-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Link: https://lore.kernel.org/r/20201105153050.19662-1-laurentiu.tudor@nxp.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aec273a3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -967,8 +967,11 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, mc);

	plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (plat_res)
	if (plat_res) {
		mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res);
		if (IS_ERR(mc->fsl_mc_regs))
			return PTR_ERR(mc->fsl_mc_regs);
	}

	if (mc->fsl_mc_regs && IS_ENABLED(CONFIG_ACPI) &&
	    !dev_of_node(&pdev->dev)) {