Re: [PATCH 1/6] net: hisilicon: add support for hisi_femac core on Hi3798MV200

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	for (i = 0; i < CLK_NUM; i++) {
> +		priv->clks[i] = devm_clk_get_enabled(&pdev->dev, clk_strs[i]);
> +		if (IS_ERR(priv->clks[i])) {
> +			dev_err(dev, "failed to get enabled clk %s: %ld\n", clk_strs[i],
> +				PTR_ERR(priv->clks[i]));
> +			ret = -ENODEV;
> +			goto out_free_netdev;
> +		}

The clk API has devm_clk_bulk_ versions. Please take a look at them, and see
if it will simplify the code.

	Andrew




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux