Re: [PATCH net-next v2 1/4] dpll: zl3073x: remove conditional return with no effect

From
Ivan Vecera <ivecera@redhat.com>
Date
2026-07-27 09:57:59
Also in
lkml
Reply to
Sang-Heon Jeon, 2026-07-25

25. července 2026 17:08:49 SELČ, Sang-Heon Jeon [off-list ref] napsal:
quoted hunk ↗ jump to hunk
Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <redacted>
---
drivers/dpll/zl3073x/dpll.c | 6 +-----
drivers/dpll/zl3073x/out.c  | 8 ++------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/dpll/zl3073x/dpll.c b/drivers/dpll/zl3073x/dpll.c
index a2a641b8358f..0488ae6ac486 100644
--- a/drivers/dpll/zl3073x/dpll.c
+++ b/drivers/dpll/zl3073x/dpll.c
@@ -2272,11 +2272,7 @@ zl3073x_dpll_init_fine_phase_adjust(struct zl3073x_dev *zldev)
	if (rc)
		return rc;

-	rc = zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
-	if (rc)
-		return rc;
-
-	return rc;
+	return zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
}

/**
diff --git a/drivers/dpll/zl3073x/out.c b/drivers/dpll/zl3073x/out.c
index eb5628aebcee..410d15b96d0b 100644
--- a/drivers/dpll/zl3073x/out.c
+++ b/drivers/dpll/zl3073x/out.c
@@ -85,12 +85,8 @@ int zl3073x_out_state_fetch(struct zl3073x_dev *zldev, u8 index)
	if (rc)
		return rc;

-	rc = zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
-			      &out->phase_comp);
-	if (rc)
-		return rc;
-
-	return rc;
+	return zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
+				&out->phase_comp);
}

/**
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Thread (9 messages) 9 messages, 5 authors, last reply 2026-07-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help