[PATCH 4/8] dm: Introduce xxx_get_dma_range()

Nicolas Saenz Julienne nsaenzjulienne at suse.de
Wed Dec 9 17:47:13 CET 2020


On Wed, 2020-12-09 at 17:30 +0100, Nicolas Saenz Julienne wrote:
> On Wed, 2020-12-09 at 13:58 +0100, Matthias Brugger wrote:
> [...]
> > > +
> > > +	/* switch to that node */
> > > +	parent = of_get_parent(dev);
> > > +	if (!parent) {
> > > +		printf("Found dma-ranges in root node, shoudln't happen\n");
> > > +		ret = -EINVAL;
> > > +		goto out;
> > > +	}
> > 
> > Aren't we missing a of_node_put(parent) here?
> 
> Yes, that's right.

Actually I now see why I didn't do it, as there is no need:

/* Dummy functions to mirror Linux. These are not used in U-Boot */
#define of_node_get(x) (x)
static inline void of_node_put(const struct device_node *np) { }

Regards,
Nicolas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201209/d26dce38/attachment.sig>


More information about the U-Boot mailing list