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:
Andrew Goodbody 2025-08-04 17:56:55 +01:00 committed by Peng Fan
parent 5b95f666fb
commit f4c2a12611

View File

@ -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");