regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt()
There is a missing call to of_node_put() if devm_kcalloc() fails. Fix this by changing the code to use cleanup.h magic to drop the refcount. Fixes: 6b0cd727 ("regulator: max20086: fix invalid memory access") Signed-off-by:Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aDVRLqgJWMxYU03G@stanley.mountain Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
Loading
Please register or sign in to comment