mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 20:36:02 +01:00
reset: Avoid a warning in devm_reset_bulk_get_by_node()
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 to explain this. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 312952)
This commit is contained in:
parent
7f0f4e1825
commit
ca4c24509c
@ -325,6 +325,8 @@ struct reset_ctl_bulk *devm_reset_bulk_get_by_node(struct udevice *dev,
|
||||
bulk = devres_alloc(devm_reset_bulk_release,
|
||||
sizeof(struct reset_ctl_bulk),
|
||||
__GFP_ZERO);
|
||||
|
||||
/* this looks like a leak, but devres takes care of it */
|
||||
if (unlikely(!bulk))
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user