From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Zabel Subject: Re: [PATCH v2] of: fix reference counting in of_graph_get_endpoint_by_regs Date: Wed, 06 Jul 2016 17:59:21 +0200 Message-ID: <1467820761.2914.7.camel@pengutronix.de> References: <1467799896-18573-1-git-send-email-l.stach@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1467799896-18573-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Lucas Stach Cc: Rob Herring , Frank Rowand , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, patchwork-lst-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: devicetree@vger.kernel.org Am Mittwoch, den 06.07.2016, 12:11 +0200 schrieb Lucas Stach: > The called of_graph_get_next_endpoint() already decrements the refcount > of the prev node, so it is wrong to do it again in the calling function. > > Use the for_each_endpoint_of_node() helper to interate through the > endpoint OF nodes, which already does the right thing and simplifies > the code a bit. > > Fixes: 8ccd0d0ca041 > (of: add helper for getting endpoint node of specific identifiers) > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Reported-by: David Jander > Signed-off-by: Lucas Stach Acked-by: Philipp Zabel regards Philipp -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html