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 56c358a..3a5f48d 100644 --- a/drivers/core/device-remove.c +++ b/drivers/core/device-remove.c @@ -126,6 +126,10 @@ void device_free(struct udevice *dev) } if (dev->parent) { size = dev->parent->driver->per_child_auto_alloc_size; + if (!size) { + size = dev->parent->uclass->uc_drv-> + per_child_auto_alloc_size; + } if (size) { free(dev->parent_priv); dev->parent_priv = NULL; |