summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2024-07-02 16:51:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-04 12:34:54 +0200
commit56a20ad349b5c51909cf8810f7c79b288864ad33 (patch)
tree12350122ee5337696714aed25d44e09b9282efcf
parentdevres: Fix memory leakage caused by driver API devm_free_percpu() (diff)
downloadlinux-56a20ad349b5c51909cf8810f7c79b288864ad33.tar.xz
linux-56a20ad349b5c51909cf8810f7c79b288864ad33.zip
devres: Initialize an uninitialized struct member
Initialize an uninitialized struct member for driver API devres_open_group(). Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/1719931914-19035-4-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/base/devres.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index 8d709dbd4e0c..e9b0d94aeabd 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]);