[PATCH 4/4] spi: nxp-fspi: disable runtime PM on probe failures

Dominique Martinet asmadeus at codewreck.org
Fri Nov 13 04:18:49 PST 2026


Jiawen Liu wrote on Sat, Jun 20, 2026 at 12:39:31PM +0400:
> @@ -1389,6 +1397,11 @@ static int nxp_fspi_probe(struct platform_device *pdev)
>  		return ret;
>  
>  	return devm_spi_register_controller(&pdev->dev, ctlr);

Should failures in devm_spi_register_controller() also go through the
error path, or is the current code as intended?
e.g. something like
---
ret = devm_spi_register_controller(&pdev->dev, ctlr);
if (ret)
	goto err_disable_pm;
return 0;
---

> +
> +err_disable_pm:
> +	pm_runtime_dont_use_autosuspend(dev);
> +	pm_runtime_disable(dev);
> +	return ret;
>  }
>  
>  static int nxp_fspi_runtime_suspend(struct device *dev)

-- 
Dominique Martinet | Asmadeus



More information about the linux-arm-kernel mailing list