Skip to content

Commit 7998166

Browse files
committed
[DM/FIXUP] Fixup block ref_count check in unregister
ref_count should zero in unregister. Signed-off-by: GuEe-GUI <[email protected]>
1 parent 951a959 commit 7998166

File tree

1 file changed

+1
-1
lines changed
  • components/drivers/block

1 file changed

+1
-1
lines changed

components/drivers/block/blk.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ rt_err_t rt_hw_blk_disk_unregister(struct rt_blk_disk *disk)
344344

345345
spin_lock(&disk->lock);
346346

347-
if (disk->parent.ref_count != 1)
347+
if (disk->parent.ref_count > 0)
348348
{
349349
err = -RT_EBUSY;
350350
goto _unlock;

0 commit comments

Comments
 (0)