Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240731191312.1710417-25-robh@kernel.org
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Rob Herring (Arm) and committed by
Uwe Kleine-König
89deb4c8 59921a73

+1 -1
+1 -1
drivers/pwm/pwm-omap-dmtimer.c
··· 355 355 goto err_platdata; 356 356 } 357 357 358 - if (!of_get_property(timer, "ti,timer-pwm", NULL)) { 358 + if (!of_property_read_bool(timer, "ti,timer-pwm")) { 359 359 dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n"); 360 360 ret = -ENODEV; 361 361 goto err_timer_property;