Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270900

Re: [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree
Date 2015-11-17 07:20 +0100
Message-ID <qvHMu-1gI-27@gated-at.bofh.it> (permalink)
References <qvCMN-6dd-7@gated-at.bofh.it> <qvCMP-6dd-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2 0/3] Devicetree bindings for Ion Laura Abbott <laura@labbott.name> - 2015-11-17 02:00 +0100
  [PATCHv2 1/3] ion: Devicetree bindings for Ion Laura Abbott <laura@labbott.name> - 2015-11-17 02:00 +0100
  [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree Laura Abbott <laura@labbott.name> - 2015-11-17 02:00 +0100
    Re: [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-17 07:20 +0100
  Re: [PATCHv2 0/3] Devicetree bindings for Ion Arnd Bergmann <arnd@arndb.de> - 2015-11-17 16:20 +0100
    Re: [PATCHv2 0/3] Devicetree bindings for Ion Laura Abbott <laura@labbott.name> - 2015-11-17 20:10 +0100

csiph-web