From: Nicolas Saenz Julienne Date: Wed, 09 Dec 2020 17:47:13 +0100 Subject: [PATCH 4/8] dm: Introduce xxx_get_dma_range() In-Reply-To: <6386a0ff8fb7c49c1d51cc743419f7cea1a813fc.camel@suse.de> References: <20201119174820.7820-1-nsaenzjulienne@suse.de> <20201119174820.7820-5-nsaenzjulienne@suse.de> <6386a0ff8fb7c49c1d51cc743419f7cea1a813fc.camel@suse.de> Message-ID: <1c868054be9bcbec60ddad703690f08fcda9bb55.camel@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: