linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree
Date: Tue, 17 Nov 2015 09:15:49 +0300	[thread overview]
Message-ID: <20151117061549.GM18797@mwanda> (raw)
In-Reply-To: <1447721855-7574-3-git-send-email-laura@labbott.name>

On Mon, Nov 16, 2015 at 04:57:34PM -0800, Laura Abbott wrote:
> +	for_each_available_child_of_node(dt_node, node) {
> +		struct platform_device *heap_pdev;
> +
> +		ret = ion_parse_dt_heap_common(node, &heaps[i], compatible);
> +		if (ret)
> +			return ERR_PTR(ret);
> +
> +		heap_pdev = of_platform_device_create(node, heaps[i].name,
> +							&pdev->dev);

We should free these if something fails later in the function.

> +		if (!pdev)
> +			return ERR_PTR(-ENOMEM);
> +		heap_pdev->dev.platform_data = &heaps[i];
> +
> +		heaps[i].priv = &heap_pdev->dev;
> +
> +		ret = ion_setup_heap_common(pdev, node, &heaps[i]);
> +		if (ret)
> +			return ERR_PTR(ret);


regards,
dan carpenter

  reply	other threads:[~2015-11-17  6:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  0:57 [PATCHv2 0/3] Devicetree bindings for Ion Laura Abbott
2015-11-17  0:57 ` [PATCHv2 1/3] ion: " Laura Abbott
2015-11-17  0:57 ` [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree Laura Abbott
2015-11-17  6:15   ` Dan Carpenter [this message]
2015-11-17  0:57 ` [PATCHv2 3/3] NOMERGE: Sample driver Laura Abbott
2015-11-17 15:15 ` [PATCHv2 0/3] Devicetree bindings for Ion Arnd Bergmann
2015-11-17 19:02   ` Laura Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151117061549.GM18797@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).