From: Trent Piepho <tpiepho-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Anton Vorontsov <avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
Richard Purdie <rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
Sean MacLennan
<smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH 1/4] leds: Support OpenFirmware led bindings
Date: Thu, 11 Dec 2008 13:33:51 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0812111326480.28806@t2.domain.actdsltmp> (raw)
In-Reply-To: <20081210163217.GA20150-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
On Wed, 10 Dec 2008, Anton Vorontsov wrote:
>> + gpio_direction_output(led_dat->gpio, led_dat->active_low);
>
> This can fail (yeah, the original code didn't check return value
> either).
I've added a check.
>> + unsigned int flags;
>
> I think it would be better to use `enum of_gpio_flags' type here,
> just for clarity.
You're right, I forgot to change this after the of_get_gpio patch was
changed.
>> + ret = create_gpio_led(&led, &pdata->led_data[pdata->num_leds++],
>> + &ofdev->dev, NULL);
>> + if (ret < 0)
>
> of_node_put(np); is missing here.
of_node_put(child) you mean. It's easy to forget this when one exits one
of these iterators early, since there's no explicit get or put otherwise.
next prev parent reply other threads:[~2008-12-11 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 15:41 [PATCH 1/4] leds: Support OpenFirmware led bindings Trent Piepho
2008-12-10 16:32 ` Anton Vorontsov
[not found] ` <20081210163217.GA20150-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2008-12-11 21:33 ` Trent Piepho [this message]
2008-12-11 21:49 ` [PATCH v2 " Trent Piepho
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=Pine.LNX.4.64.0812111326480.28806@t2.domain.actdsltmp \
--to=tpiepho-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org \
--cc=smaclennan-Qtffpm9i2AVWk0Htik3J/w@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