Skip to content

Commit

Permalink
i7core_edac: We need to use list_for_each_entry_safe to avoid errors
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 10, 2010
1 parent 22e6bcb commit 4253868
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,7 @@ static struct mcidev_sysfs_attribute i7core_inj_attrs[] = {
.show = i7core_ce_regs_show,
.store = NULL,
},
{ .attr = { .name = NULL } }
};

/****************************************************************************
Expand Down Expand Up @@ -1155,9 +1156,9 @@ static void i7core_put_devices(struct i7core_dev *i7core_dev)

static void i7core_put_all_devices(void)
{
struct i7core_dev *i7core_dev;
struct i7core_dev *i7core_dev, *tmp;

list_for_each_entry(i7core_dev, &i7core_edac_list, list)
list_for_each_entry_safe(i7core_dev, tmp, &i7core_edac_list, list)
i7core_put_devices(i7core_dev);
}

Expand Down

0 comments on commit 4253868

Please sign in to comment.