Skip to content

Commit a05f5d0

Browse files
prabhakarladpavelmachek
authored andcommitted
leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dt
output of dev_of_node() is already assigned to "np" variable in ktd2692_parse_dt(). Use "np" variable to check if OF node is NULL instead of calling dev_of_node() again. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
1 parent 2702c9b commit a05f5d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/flash/leds-ktd2692.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
274274
struct device_node *child_node;
275275
int ret;
276276

277-
if (!dev_of_node(dev))
277+
if (!np)
278278
return -ENXIO;
279279

280280
led->ctrl_gpio = devm_gpiod_get(dev, "ctrl", GPIOD_ASIS);

0 commit comments

Comments
 (0)