From: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Clement Perrochaud <clement.perrochaud-3arQi8VN3Tc@public.gmane.org>
Cc: "linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [linux-nfc] [PATCH v3 1/2] NFC: pn544_i2c: Add device-tree (Open Firmware) support to PN544
Date: Tue, 1 Apr 2014 01:48:59 +0200 [thread overview]
Message-ID: <20140331234859.GA1152@zurbaran> (raw)
In-Reply-To: <92d1a06e7bda4a46a0b6a28ba6ede55b-fjMGVQzTDdguRZvghep3ngfhPeD8jYilXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
Hi Clement,
One more comment:
On Mon, Mar 31, 2014 at 12:21:44PM +0000, Clement Perrochaud wrote:
> + /* No platform data, using device tree. */
> + if (!pdata && client->dev.of_node) {
> + r = pn544_hci_i2c_of_request_resources(client);
> + if (r) {
> + nfc_err(&client->dev, "No DT data\n");
> + return r;
> + }
> + /* Using platform data. */
> + } else {
That should be: } else if (pdata) {
as you need to check for pdata before dereferencing it.
And your final else will handle the error case where both pdata and of_node
are NULL.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-03-31 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 12:21 [PATCH v3 1/2] NFC: pn544_i2c: Add device-tree (Open Firmware) support to PN544 Clement Perrochaud
[not found] ` <92d1a06e7bda4a46a0b6a28ba6ede55b-fjMGVQzTDdguRZvghep3ngfhPeD8jYilXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-03-31 23:48 ` Samuel Ortiz [this message]
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=20140331234859.GA1152@zurbaran \
--to=sameo-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=clement.perrochaud-3arQi8VN3Tc@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfc-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.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