On 7/23/2019 8:02 AM, Robin Murphy wrote: > Why not just add it once at the "out" label itself? (Consider the > conditions for the loop terminating naturally) > +1 >> >> Signed-off-by: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx> >> --- >> drivers/dma/qcom/hidma_mgmt.c | 13 ++++++++++--- >> 1 file changed, 10 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/dma/qcom/hidma_mgmt.c >> b/drivers/dma/qcom/hidma_mgmt.c >> index 3022d66e7a33..209adc6ceabe 100644 >> --- a/drivers/dma/qcom/hidma_mgmt.c >> +++ b/drivers/dma/qcom/hidma_mgmt.c >> @@ -362,16 +362,22 @@ static int __init >> hidma_mgmt_of_populate_channels(struct device_node *np) >> struct platform_device *new_pdev; >> ret = of_address_to_resource(child, 0, &res[0]); >> - if (!ret) >> + if (!ret) { >> + of_node_put(child); The spacing on this also looks weird. >> goto out; >> + }