Commit 11b11773 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'edac_fixes_for_5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull EDAC fixes from Borislav Petkov:

 - Do not build mpc85_edac as a module (Michael Ellerman)

 - Correct edac_mc_find()'s return value on error (Robert Richter)

* tag 'edac_fixes_for_5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC/mc: Fix edac_mc_find() in case no device is found
  EDAC/mpc85xx: Prevent building as a module
parents 4e785e8d 29a0c843
...@@ -263,8 +263,8 @@ config EDAC_PND2 ...@@ -263,8 +263,8 @@ config EDAC_PND2
micro-server but may appear on others in the future. micro-server but may appear on others in the future.
config EDAC_MPC85XX config EDAC_MPC85XX
tristate "Freescale MPC83xx / MPC85xx" bool "Freescale MPC83xx / MPC85xx"
depends on FSL_SOC depends on FSL_SOC && EDAC=y
help help
Support for error detection and correction on the Freescale Support for error detection and correction on the Freescale
MPC8349, MPC8560, MPC8540, MPC8548, T4240 MPC8349, MPC8560, MPC8540, MPC8548, T4240
......
...@@ -679,22 +679,18 @@ static int del_mc_from_global_list(struct mem_ctl_info *mci) ...@@ -679,22 +679,18 @@ static int del_mc_from_global_list(struct mem_ctl_info *mci)
struct mem_ctl_info *edac_mc_find(int idx) struct mem_ctl_info *edac_mc_find(int idx)
{ {
struct mem_ctl_info *mci = NULL; struct mem_ctl_info *mci;
struct list_head *item; struct list_head *item;
mutex_lock(&mem_ctls_mutex); mutex_lock(&mem_ctls_mutex);
list_for_each(item, &mc_devices) { list_for_each(item, &mc_devices) {
mci = list_entry(item, struct mem_ctl_info, link); mci = list_entry(item, struct mem_ctl_info, link);
if (mci->mc_idx == idx)
if (mci->mc_idx >= idx) { goto unlock;
if (mci->mc_idx == idx) {
goto unlock;
}
break;
}
} }
mci = NULL;
unlock: unlock:
mutex_unlock(&mem_ctls_mutex); mutex_unlock(&mem_ctls_mutex);
return mci; return mci;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment