Use use device_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c index 5da5dd51542c..43bd15f16377 100644 --- a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c +++ b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c @@ -52,7 +52,7 @@ static int qdf2xxx_pinctrl_probe(struct platform_device *pdev) } /* The number of GPIOs in the approved list */ - ret = device_property_read_u8_array(&pdev->dev, "gpios", NULL, 0); + ret = device_property_count_u8(&pdev->dev, "gpios"); if (ret < 0) { dev_err(&pdev->dev, "missing 'gpios' property\n"); return ret; -- 2.20.1