Subject: [PATCH] EDAC: e752x: fix DRAM_NERR read/write race

info->dram_nerr is read earlier in this function. If between that read
and this update more error bits get set, then they will be cleared without
checking. If that was the real intent here then writing 0xFFFF to
E752X_DRAM_NERR gives more predictable results.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index facfdb1..c7a7bed 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -864,8 +864,8 @@ static void e752x_get_error_info(struct mem_ctl_info *mci,
 					info->buf_nerr);
 
 		if (info->dram_nerr)
-			pci_write_bits16(pvt->bridge_ck, E752X_DRAM_NERR,
-					 info->dram_nerr, info->dram_nerr);
+			pci_write_config_word(pvt->bridge_ck, E752X_DRAM_NERR,
+					 info->dram_nerr);
 
 		pci_write_config_dword(dev, E752X_NERR_GLOBAL,
 				info->nerr_global);
