[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1719579692-9700-1-git-send-email-quic_zijuhu@quicinc.com>
Date: Fri, 28 Jun 2024 21:01:32 +0800
From: Zijun Hu <quic_zijuhu@...cinc.com>
To: <gregkh@...uxfoundation.org>, <rafael@...nel.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] devres: Initialize a uninitialized struct member
From: Zijun Hu <zijuhu@....qualcomm.com>
Initialize an uninitialized struct member for driver API
devres_open_group().
Signed-off-by: Zijun Hu <zijuhu@....qualcomm.com>
---
V2: Simplify fix by use = instead of memset() and commit message
Previous discussion link:
https://lore.kernel.org/lkml/1718629765-32720-1-git-send-email-quic_zijuhu@quicinc.com/
drivers/base/devres.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index 3df0025d12aa..3beedeaa0ffc 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -567,6 +567,7 @@ void * devres_open_group(struct device *dev, void *id, gfp_t gfp)
grp->id = grp;
if (id)
grp->id = id;
+ grp->color = 0;
spin_lock_irqsave(&dev->devres_lock, flags);
add_dr(dev, &grp->node[0]);
--
2.7.4
Powered by blists - more mailing lists