Commit 58452555 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller
Browse files

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf3399b7
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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)) {
	} else {
		err = device_property_read_u32(&pdev->dev, "clock-frequency", &priv->tclk);
		if (err) {
			dev_err(&pdev->dev, "missing clock-frequency value\n");
		return -EINVAL;
			return err;
		}
	}

	if (priv->hw_version >= MVPP22) {