diff options
-rw-r--r-- | drivers/mailbox/tegra-hsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 3724f2fcd371..0cde356c11ab 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c | |||
@@ -334,12 +334,12 @@ static struct mbox_chan *of_tegra_hsp_xlate(struct mbox_controller *mbox, | |||
334 | 334 | ||
335 | static void tegra_hsp_remove_doorbells(struct tegra_hsp *hsp) | 335 | static void tegra_hsp_remove_doorbells(struct tegra_hsp *hsp) |
336 | { | 336 | { |
337 | struct tegra_hsp_doorbell *db; | 337 | struct tegra_hsp_doorbell *db, *tmp; |
338 | unsigned long flags; | 338 | unsigned long flags; |
339 | 339 | ||
340 | spin_lock_irqsave(&hsp->lock, flags); | 340 | spin_lock_irqsave(&hsp->lock, flags); |
341 | 341 | ||
342 | list_for_each_entry(db, &hsp->doorbells, list) | 342 | list_for_each_entry_safe(db, tmp, &hsp->doorbells, list) |
343 | __tegra_hsp_doorbell_destroy(db); | 343 | __tegra_hsp_doorbell_destroy(db); |
344 | 344 | ||
345 | spin_unlock_irqrestore(&hsp->lock, flags); | 345 | spin_unlock_irqrestore(&hsp->lock, flags); |