From: Pavel Machek <pavel@ucw.cz>
To: Dan Murphy <dmurphy@ti.com>
Cc: jacek.anaszewski@gmail.com, robh@kernel.org, marek.behun@nic.cz,
devicetree@vger.kernel.org, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v32 2/6] leds: lp50xx: Add the LP50XX family of the RGB LED driver
Date: Tue, 11 Aug 2020 12:31:03 +0200 [thread overview]
Message-ID: <20200811103103.bxzvodpkypianz55@duo.ucw.cz> (raw)
In-Reply-To: <20200722153146.8767-3-dmurphy@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]
Hi!
> Introduce the LP5036/30/24/18/12/9 RGB LED driver.
> The difference in these parts are the number of
> LED outputs where the:
>
> LP5036 can control 36 LEDs
> LP5030 can control 30 LEDs
> LP5024 can control 24 LEDs
> LP5018 can control 18 LEDs
> LP5012 can control 12 LEDs
> LP5009 can control 9 LEDs
>
> + fwnode_for_each_child_node(child, led_node) {
> + ret = fwnode_property_read_u32(led_node, "color",
> + &color_id);
> + if (ret) {
> + dev_err(priv->dev, "Cannot read color\n");
> + goto child_out;
> + }
> +
> + mc_led_info[num_colors].color_index = color_id;
> + num_colors++;
> + }
> +
> + led->priv = priv;
> + led->mc_cdev.num_colors = num_colors;
> + led->mc_cdev.subled_info = mc_led_info;
> + led_cdev = &led->mc_cdev.led_cdev;
> + led_cdev->brightness_set_blocking = lp50xx_brightness_set;
> +
> + fwnode_property_read_string(child, "linux,default-trigger",
> + &led_cdev->default_trigger);
> +
> + ret = devm_led_classdev_multicolor_register_ext(&priv->client->dev,
> + &led->mc_cdev,
> + &init_data);
> + if (ret) {
> + dev_err(&priv->client->dev, "led register err: %d\n",
> + ret);
> + goto child_out;
> + }
> + i++;
> + }
> +
> + return 0;
> +
> +child_out:
> + fwnode_handle_put(child);
> + return ret;
> +}
Are you really sure fwnode_handle_put() handling is okay here? In
particular, where does that happen in non-error path?
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2020-08-11 10:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 15:31 [PATCH v32 0/6] Multicolor Framework v32 Dan Murphy
2020-07-22 15:31 ` [PATCH v32 1/6] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2020-07-28 13:39 ` Dan Murphy
2020-08-04 19:55 ` Dan Murphy
2020-08-07 13:42 ` Dan Murphy
2020-08-11 10:32 ` Pavel Machek
2020-08-11 10:20 ` Pavel Machek
2020-08-11 17:07 ` Dan Murphy
2020-07-22 15:31 ` [PATCH v32 2/6] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2020-08-11 10:29 ` Pavel Machek
2020-08-11 10:31 ` Pavel Machek [this message]
2020-08-11 10:54 ` Pavel Machek
2020-08-11 17:27 ` Dan Murphy
2020-08-11 22:01 ` Pavel Machek
2020-08-11 22:16 ` Dan Murphy
2020-08-11 22:26 ` Pavel Machek
2020-08-12 16:00 ` Dan Murphy
2020-07-22 15:31 ` [PATCH v32 3/6] ARM: defconfig: u8500: Add LP55XX_COMMON config flag Dan Murphy
2020-07-28 13:38 ` Dan Murphy
2020-08-03 23:14 ` Linus Walleij
2020-07-22 15:31 ` [PATCH v32 4/6] ARM: dts: n900: Add reg property to the LP5523 channel node Dan Murphy
2020-07-22 15:31 ` [PATCH v32 5/6] ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 " Dan Murphy
2020-07-22 15:31 ` [PATCH v32 6/6] ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Dan Murphy
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=20200811103103.bxzvodpkypianz55@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=robh@kernel.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;
as well as URLs for NNTP newsgroup(s).