[PATCH] EDAC/ghes: Do not warn on when increment refcount on 0
From: Robert Richter
Date: Thu Nov 21 2019 - 09:01:28 EST
Signed-off-by: Robert Richter <rrichter@xxxxxxxxxxx>
---
drivers/edac/ghes_edac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 47f4e7f90ef0..b99080d8a10c 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -556,8 +556,8 @@ int ghes_edac_register(struct ghes *ghes, struct device=
*dev)
ghes_pvt =3D pvt;
spin_unlock_irqrestore(&ghes_lock, flags);
=20
- /* only increment on success */
- refcount_inc(&ghes_refcount);
+ /* only set on success */
+ refcount_set(&ghes_refcount, 1);
=20
unlock:
mutex_unlock(&ghes_reg_mutex);
--=20
2.20.1