If a csrow is not found by edac_mc_find_csrow_by_page(), it
currently returns -1, to mean that the page is invalid. Use
the proper errorcode macro for that (-EINVAL).

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
 drivers/edac/edac_mc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index c3ee3ad98a63..0438d3a48191 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -845,7 +845,7 @@ int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, 
unsigned long page)
        int row, i, j, n;
 
        edac_dbg(1, "MC%d: 0x%lx\n", mci->mc_idx, page);
-       row = -1;
+       row = -EINVAL;
 
        for (i = 0; i < mci->nr_csrows; i++) {
                struct csrow_info *csrow = csrows[i];
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to