Merge tag 'v2021.01-rc5' into next
[platform/kernel/u-boot.git] / drivers / core / device-remove.c
index 9f7615d..8a5f958 100644 (file)
@@ -152,7 +152,7 @@ void device_free(struct udevice *dev)
 static bool flags_remove(uint flags, uint drv_flags)
 {
        if ((flags & DM_REMOVE_NORMAL) ||
-           (flags & (drv_flags & (DM_FLAG_ACTIVE_DMA | DM_FLAG_OS_PREPARE))))
+           (flags && (drv_flags & (DM_FLAG_ACTIVE_DMA | DM_FLAG_OS_PREPARE))))
                return true;
 
        return false;
@@ -207,7 +207,6 @@ int device_remove(struct udevice *dev, uint flags)
        if (flags_remove(flags, drv->flags)) {
                device_free(dev);
 
-               dev->seq = -1;
                dev->flags &= ~DM_FLAG_ACTIVATED;
        }