[PATCH 03/12] edac: edac_mc.c: Use an error code instead of -1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mchehab@xxxxxxxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux