mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
net: stmmac: Fix return value check in qcom_ethqos_probe()
In case of error, the function devm_clk_get() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a7c30e62d4 ("net: stmmac: Add driver for Qualcomm ethqos")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
843ef94e33
commit
8f4ebaaa8d
1 changed files with 2 additions and 2 deletions
|
|
@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
|||
ethqos->por = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
|
||||
if (!ethqos->rgmii_clk) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(ethqos->rgmii_clk)) {
|
||||
ret = PTR_ERR(ethqos->rgmii_clk);
|
||||
goto err_mem;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue