Skip to contentSkip to conversation

ptp: fc3: remove redundant check on variable ret

PATCH Applied Colin Ian King 2 participants 2 messages Oct 31, 2024 – Nov 3, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptp: fc3: remove redundant check on variable ret

The check on ret has already been performed a few statements earlier and ret has not been re-assigned and so the re-checking is redundant. Clean up the code by removing the redundant check.

---
 drivers/ptp/ptp_fc3.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/ptp/ptp_fc3.c +0 -5
index e14e149b746e..879b82f03535 100644
@@ -986,11 +986,6 @@ static int idtfc3_probe(struct platform_device *pdev)
 
 	mutex_unlock(idtfc3->lock);
 
-	if (err) {
-		ptp_clock_unregister(idtfc3->ptp_clock);
-		return err;
-	}
-
 	platform_set_drvdata(pdev, idtfc3);
 
 	return 0;
Signature · 1 line
2.39.5
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Thu, 31 Oct 2024 13:50:42 +0000 you wrote:

The check on ret has already been performed a few statements earlier and ret has not been re-assigned and so the re-checking is redundant. Clean up the code by removing the redundant check.

---
 drivers/ptp/ptp_fc3.c | 5 -----
 1 file changed, 5 deletions(-)

Here is the summary with links:
- [next] ptp: fc3: remove redundant check on variable ret

    https://git.kernel.org/netdev/net-next/c/5c87206cdb53

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html