[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486322541-8206-190-git-send-email-w@1wt.eu>
Date: Sun, 5 Feb 2017 20:21:51 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Johan Hovold <johan@...nel.org>, Lee Jones <lee.jones@...aro.org>,
Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 289/319] mfd: core: Fix device reference leak in mfd_clone_cell
From: Johan Hovold <johan@...nel.org>
commit 722f191080de641f023feaa7d5648caf377844f5 upstream.
Make sure to drop the reference taken by bus_find_device_by_name()
before returning from mfd_clone_cell().
Fixes: a9bbba996302 ("mfd: add platform_device sharing support for mfd")
Signed-off-by: Johan Hovold <johan@...nel.org>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Willy Tarreau <w@....eu>
---
drivers/mfd/mfd-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 7604f4e..af6a245 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -263,6 +263,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones)
clones[i]);
}
+ put_device(dev);
+
return 0;
}
EXPORT_SYMBOL(mfd_clone_cell);
--
2.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists