summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-05-14 04:39:22 +0300
committerTom Rini <trini@konsulko.com>2021-07-16 01:42:05 +0300
commit37e79ee0e8f93674a6247cf5c973920f18fd3578 (patch)
tree759600927649b13a084bd54b036b832d3b95a040 /drivers/core
parentca4c24509c60cfc95563d25b482cfed3789aca59 (diff)
downloadu-boot-37e79ee0e8f93674a6247cf5c973920f18fd3578.tar.xz
reset: Avoid a warning in devm_regmap_init()
The devres_alloc() function is intended to avoid the need for freeing memory, although in practice it may not be enabled, thus leading to a true leak. Nevertheless this is intended. Add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 312951)
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/regmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 3206f3d112..5f98f85cfc 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -293,6 +293,7 @@ struct regmap *devm_regmap_init(struct udevice *dev,
int rc;
struct regmap **mapp, *map;
+ /* this looks like a leak, but devres takes care of it */
mapp = devres_alloc(devm_regmap_release, sizeof(struct regmap *),
__GFP_ZERO);
if (unlikely(!mapp))