mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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)
This commit is contained in:
parent
ca4c24509c
commit
37e79ee0e8
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue