mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-24 10:52:13 +01:00
net: fsl_enetc: Fix copy/paste error
In netc_blk_ctrl_probe the test for failure of the function clk_prepare_enable should not return PTR_ERR(ipg_clk) as it does not check IS_ERR(ipg_clk) instead it should return err as that is what is holding the error code in this case. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
5b95f666fb
commit
f4c2a12611
@ -293,7 +293,7 @@ static int netc_blk_ctrl_probe(struct udevice *dev)
|
||||
err = clk_prepare_enable(ipg_clk);
|
||||
if (err) {
|
||||
dev_err(dev, "Enable ipg clock failed\n");
|
||||
return PTR_ERR(ipg_clk);
|
||||
return err;
|
||||
}
|
||||
|
||||
regs = dev_read_addr_name(dev, "ierb");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user