--- zzzz-none-000/linux-5.4.213/drivers/w1/masters/w1-gpio.c 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/drivers/w1/masters/w1-gpio.c 2024-05-29 11:20:02.000000000 +0000 @@ -76,7 +76,7 @@ enum gpiod_flags gflags = GPIOD_OUT_LOW_OPEN_DRAIN; int err; - if (of_have_populated_dt()) { + if (of_have_populated_dt() && !dev_get_platdata(&pdev->dev)) { pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM;