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
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laura Abbott <laura@labbott.name>
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
Feng Tang <feng.tang@intel.com>,
Andrew Andrianov <andrew@ncrmnt.org>,
Tom Gall <tom.gall@linaro.org>,
romlem@google.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
arve@android.com, Colin Cross <ccross@google.com>,
linux-kernel@vger.kernel.org,
Riley Andrews <riandrews@android.com>,
Rob Herring <robh+dt@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Grant Likely <grant.likely@linaro.org>,
Frank Rowand <frowand.list@gmail.com>,
Sumit Semwal <sumit.semwal@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
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2015-11-17 6:15 UTC|newest]
Thread overview: 20+ 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 ` Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 0:57 ` [PATCHv2 1/3] ion: " Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 0:57 ` [PATCHv2 2/3] staging: ion: Add files for parsing the devicetree Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 6:15 ` Dan Carpenter [this message]
2015-11-17 6:15 ` Dan Carpenter
2015-11-17 6:15 ` Dan Carpenter
2015-11-17 0:57 ` [PATCHv2 3/3] NOMERGE: Sample driver Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 0:57 ` Laura Abbott
2015-11-17 15:15 ` [PATCHv2 0/3] Devicetree bindings for Ion Arnd Bergmann
2015-11-17 15:15 ` Arnd Bergmann
2015-11-17 15:15 ` Arnd Bergmann
2015-11-17 19:02 ` Laura Abbott
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.