public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laura Abbott <laura@labbott.name>
Cc: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Andrew Andrianov <andrew@ncrmnt.org>,
	arve@android.com, Riley Andrews <riandrews@android.com>,
	devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
	Feng Tang <feng.tang@intel.com>, Tom Gall <tom.gall@linaro.org>,
	romlem@google.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Colin Cross <ccross@google.com>,
	John Stultz <john.stultz@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [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:17 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=andrew@ncrmnt.org \
    --cc=arve@android.com \
    --cc=ccross@google.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=feng.tang@intel.com \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=laura@labbott.name \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=riandrews@android.com \
    --cc=robh+dt@kernel.org \
    --cc=romlem@google.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tom.gall@linaro.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