diff mbox series

[next] ptp: fc3: remove redundant check on variable ret

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

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 2 of 2 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-11-02--06-00 (tests: 779)

Commit Message

Colin Ian King Oct. 31, 2024, 1:50 p.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 3, 2024, 9 p.m. UTC | #1
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 mbox series

Patch

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;