[PATCH 07/11] drivers: phy: phy-mtk-ufs: do not alloc priv with priv_auto

Neil Armstrong neil.armstrong at linaro.org
Tue Mar 17 15:55:14 CET 2026


On 3/17/26 15:24, Julien Stephan wrote:
> When priv_auto is specified, we should not manually alloc memory for
> priv data.
> 
> Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> ---
>   drivers/phy/phy-mtk-ufs.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/phy/phy-mtk-ufs.c b/drivers/phy/phy-mtk-ufs.c
> index 0522e1ab683..c4c214dcde0 100644
> --- a/drivers/phy/phy-mtk-ufs.c
> +++ b/drivers/phy/phy-mtk-ufs.c
> @@ -139,10 +139,6 @@ static int mtk_ufs_phy_probe(struct udevice *dev)
>   	fdt_addr_t addr;
>   	int ret;
>   
> -	phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
> -	if (!phy)
> -		return -ENOMEM;
> -
>   	addr = dev_read_addr(dev);
>   	if (addr == FDT_ADDR_T_NONE)
>   		return -ENOMEM;
> 

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Thanks,
Neil


More information about the U-Boot mailing list