diff options
Diffstat (limited to 'drivers/core/device-remove.c')
-rw-r--r-- | drivers/core/device-remove.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c index 2c8257752b..56c358a0ec 100644 --- a/drivers/core/device-remove.c +++ b/drivers/core/device-remove.c @@ -92,6 +92,10 @@ int device_unbind(struct udevice *dev) free(dev->platdata); dev->platdata = NULL; } + if (dev->flags & DM_FLAG_ALLOC_PARENT_PDATA) { + free(dev->parent_platdata); + dev->parent_platdata = NULL; + } ret = uclass_unbind_device(dev); if (ret) return ret; |