Message ID | 20241031135042.3250614-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 5c87206cdb537f67c51f3f9a229258dce77d9a23 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [next] ptp: fc3: remove redundant check on variable ret | expand |
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: 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. > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> > --- > 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!
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;
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(-)