mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 23:11:32 +02:00
dm: core: Avoid partially removing devices
At present if device_remove() decides that the device should not actually be removed, it still calls the uclass pre_remove() method and powers the device down. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -123,7 +123,9 @@ static int dm_test_virtio_remove(struct unit_test_state *uts)
|
||||
|
||||
/* check the device can be successfully removed */
|
||||
dev_or_flags(dev, DM_FLAG_ACTIVATED);
|
||||
ut_assertok(device_remove(bus, DM_REMOVE_ACTIVE_ALL));
|
||||
ut_asserteq(-EKEYREJECTED, device_remove(bus, DM_REMOVE_ACTIVE_ALL));
|
||||
|
||||
ut_asserteq(false, device_active(dev));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user