mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
dm: core: Fix incorrect flag check
The test should be checking whether $flags are non-zero and $drv_flags contain specific flags, however these two sets of flags are separate, and the two tests should be logically ANDed, not bitwise ANDed. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
87d07ccc23
commit
e7e7e1093b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue