diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-04 17:56:55 +0100 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2025-08-27 15:42:07 +0800 |
| commit | f4c2a12611d3ffdbd624ededf0fce192f26dddaf (patch) | |
| tree | 9549b188d365c4e752afaa2e44299d41fe5775cb /drivers/net | |
| parent | 5b95f666fbd8f9c9c43726c7ced229762e4a35e0 (diff) | |
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 <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/fsl_enetc_netc_blk_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fsl_enetc_netc_blk_ctrl.c b/drivers/net/fsl_enetc_netc_blk_ctrl.c index 46b68d3d8a4..fecd66eb15a 100644 --- a/drivers/net/fsl_enetc_netc_blk_ctrl.c +++ b/drivers/net/fsl_enetc_netc_blk_ctrl.c @@ -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"); |
