mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] ptp: fc3: remove redundant check on variable ret
@ 2024-10-31 13:50 Colin Ian King
  2024-11-03 21:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-10-31 13:50 UTC (permalink / raw)
  To: Richard Cochran, netdev; +Cc: kernel-janitors, linux-kernel

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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/ptp/ptp_fc3.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/ptp/ptp_fc3.c b/drivers/ptp/ptp_fc3.c
index e14e149b746e..879b82f03535 100644
--- a/drivers/ptp/ptp_fc3.c
+++ b/drivers/ptp/ptp_fc3.c
@@ -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;
-- 
2.39.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-03 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-31 13:50 [PATCH][next] ptp: fc3: remove redundant check on variable ret Colin Ian King
2024-11-03 21:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome