lkml.org 
[lkml]   [2023]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [regulator] pwm-regulator: Add error handling
On Wed, Nov 29, 2023 at 05:05:30AM -0800, Haoran Liu wrote:

> + ret = of_property_read_u32_array(pdev->dev.of_node,
> + "pwm-dutycycle-range",
> + dutycycle_range, 2);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "Failed to read pwm-dutycycle-range: %d\n", ret);
> + return ret;
> + }
> +
> + ret = of_property_read_u32(pdev->dev.of_node,
> + "pwm-dutycycle-unit",
> + &dutycycle_unit);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "Failed to read pwm-dutycycle-unit: %d\n", ret);
> + return ret;
> + }

These properties are both optiona..
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-11-29 14:24    [W:0.042 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site