Skip to content

Commit 89deb4c

Browse files
robherringUwe Kleine-König
authored andcommitted
pwm: omap-dmtimer: Use of_property_read_bool()
Use of_property_read_bool() to read boolean properties rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed. Signed-off-by: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 59921a7 commit 89deb4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-omap-dmtimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
355355
goto err_platdata;
356356
}
357357

358-
if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
358+
if (!of_property_read_bool(timer, "ti,timer-pwm")) {
359359
dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
360360
ret = -ENODEV;
361361
goto err_timer_property;

0 commit comments

Comments
 (0)