net: mvpp2: Unshadow error code of device_property_read_u32()

device_property_read_u32() may return different error codes.
Propagate it to the caller.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andy Shevchenko 2021-05-10 12:58:08 +03:00 коммит произвёл David S. Miller
Родитель cf3399b731
Коммит 584525554f
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -7458,10 +7458,12 @@ static int mvpp2_probe(struct platform_device *pdev)
/* Get system's tclk rate */
priv->tclk = clk_get_rate(priv->pp_clk);
} else if (device_property_read_u32(&pdev->dev, "clock-frequency",
&priv->tclk)) {
dev_err(&pdev->dev, "missing clock-frequency value\n");
return -EINVAL;
} else {
err = device_property_read_u32(&pdev->dev, "clock-frequency", &priv->tclk);
if (err) {
dev_err(&pdev->dev, "missing clock-frequency value\n");
return err;
}
}
if (priv->hw_version >= MVPP22) {