diff options
| -rw-r--r-- | drivers/edac/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/edac/edac_mc.c | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 47eb4d13ed5f..5e2e0348d460 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
| @@ -263,8 +263,8 @@ config EDAC_PND2 | |||
| 263 | micro-server but may appear on others in the future. | 263 | micro-server but may appear on others in the future. |
| 264 | 264 | ||
| 265 | config EDAC_MPC85XX | 265 | config EDAC_MPC85XX |
| 266 | tristate "Freescale MPC83xx / MPC85xx" | 266 | bool "Freescale MPC83xx / MPC85xx" |
| 267 | depends on FSL_SOC | 267 | depends on FSL_SOC && EDAC=y |
| 268 | help | 268 | help |
| 269 | Support for error detection and correction on the Freescale | 269 | Support for error detection and correction on the Freescale |
| 270 | MPC8349, MPC8560, MPC8540, MPC8548, T4240 | 270 | MPC8349, MPC8560, MPC8540, MPC8548, T4240 |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 13594ffadcb3..64922c8fa7e3 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
| @@ -679,22 +679,18 @@ static int del_mc_from_global_list(struct mem_ctl_info *mci) | |||
| 679 | 679 | ||
| 680 | struct mem_ctl_info *edac_mc_find(int idx) | 680 | struct mem_ctl_info *edac_mc_find(int idx) |
| 681 | { | 681 | { |
| 682 | struct mem_ctl_info *mci = NULL; | 682 | struct mem_ctl_info *mci; |
| 683 | struct list_head *item; | 683 | struct list_head *item; |
| 684 | 684 | ||
| 685 | mutex_lock(&mem_ctls_mutex); | 685 | mutex_lock(&mem_ctls_mutex); |
| 686 | 686 | ||
| 687 | list_for_each(item, &mc_devices) { | 687 | list_for_each(item, &mc_devices) { |
| 688 | mci = list_entry(item, struct mem_ctl_info, link); | 688 | mci = list_entry(item, struct mem_ctl_info, link); |
| 689 | 689 | if (mci->mc_idx == idx) | |
| 690 | if (mci->mc_idx >= idx) { | 690 | goto unlock; |
| 691 | if (mci->mc_idx == idx) { | ||
| 692 | goto unlock; | ||
| 693 | } | ||
| 694 | break; | ||
| 695 | } | ||
| 696 | } | 691 | } |
| 697 | 692 | ||
| 693 | mci = NULL; | ||
| 698 | unlock: | 694 | unlock: |
| 699 | mutex_unlock(&mem_ctls_mutex); | 695 | mutex_unlock(&mem_ctls_mutex); |
| 700 | return mci; | 696 | return mci; |
