]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/core/device-remove.c
dm: core: Extend struct udevice by '.uclass_platdata' field.
[karo-tx-uboot.git] / drivers / core / device-remove.c
index 7fee1c001e4310d8b84355a518a69f93118b4d4d..6a16b4f690fd9392eb7637799ac777b3befc2e1f 100644 (file)
@@ -92,6 +92,10 @@ int device_unbind(struct udevice *dev)
                free(dev->platdata);
                dev->platdata = NULL;
        }
+       if (dev->flags & DM_FLAG_ALLOC_UCLASS_PDATA) {
+               free(dev->uclass_platdata);
+               dev->uclass_platdata = NULL;
+       }
        if (dev->flags & DM_FLAG_ALLOC_PARENT_PDATA) {
                free(dev->parent_platdata);
                dev->parent_platdata = NULL;