drivers: phy: phy-mtk-ufs: do not alloc priv with priv_auto

When priv_auto is specified, we should not manually alloc memory for
priv data.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260318-mt8195-add-ufs-support-v2-5-f18eeeeb0e72@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
This commit is contained in:
Julien Stephan
2026-03-18 17:50:57 +01:00
committed by David Lechner
parent ebb222e8c5
commit e13229b66a

View File

@@ -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;