Re: [PATCH v5 2/4] soc: samsung: usi: add a routine for unconfiguring the ip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/01/2025 10:03, Ivaylo Ivanov wrote:
>  static int exynos_usi_parse_dt(struct device_node *np, struct exynos_usi *usi)
>  {
>  	int ret;
> @@ -251,6 +268,10 @@ static int exynos_usi_probe(struct platform_device *pdev)
>  			return PTR_ERR(usi->regs);
>  	}
>  
> +	ret = devm_add_action_or_reset(&pdev->dev, exynos_usi_unconfigure, usi);
> +	if (ret)
> +		return ret;

You should not reverse the action before the action actually takes place.

> +
>  	ret = exynos_usi_configure(usi);
>  	if (ret)
>  		return ret;

Registering cleanup should therefore happen here.


Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux