]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
drivers: phy: phy-mtk-ufs: do not alloc priv with priv_auto
authorJulien Stephan <jstephan@baylibre.com>
Wed, 18 Mar 2026 16:50:57 +0000 (17:50 +0100)
committerDavid Lechner <dlechner@baylibre.com>
Fri, 17 Apr 2026 22:05:54 +0000 (17:05 -0500)
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>
drivers/phy/phy-mtk-ufs.c

index 0522e1ab683124d85dc06022a69ee394cbf383e5..c4c214dcde051133150b4aa95dfe09db20012cec 100644 (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;