Fix infinite-loop in rt_mmcsd_blk_remove.
1. Issue on traveling latest node in list if multi-partitions on card.
This commit is contained in:
parent
669eacc443
commit
c84952d9cd
|
@ -496,7 +496,7 @@ void rt_mmcsd_blk_remove(struct rt_mmcsd_card *card)
|
||||||
rt_list_t *l, *n;
|
rt_list_t *l, *n;
|
||||||
struct mmcsd_blk_device *blk_dev;
|
struct mmcsd_blk_device *blk_dev;
|
||||||
|
|
||||||
for (l = (&blk_devices)->next, n = l->next; l != &blk_devices; l = n)
|
for (l = (&blk_devices)->next, n = l->next; l != &blk_devices; l = n, n = n->next)
|
||||||
{
|
{
|
||||||
blk_dev = (struct mmcsd_blk_device *)rt_list_entry(l, struct mmcsd_blk_device, list);
|
blk_dev = (struct mmcsd_blk_device *)rt_list_entry(l, struct mmcsd_blk_device, list);
|
||||||
if (blk_dev->card == card)
|
if (blk_dev->card == card)
|
||||||
|
|
Loading…
Reference in New Issue