All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: kuba@kernel.org, Ivan Vecera <ivecera@redhat.com>,
	Prathosh Satish <Prathosh.Satish@microchip.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	Jiri Pirko <jiri@resnulli.us>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH net-next v2 1/4] dpll: zl3073x: remove conditional return with no effect
Date: Sun, 26 Jul 2026 00:08:49 +0900	[thread overview]
Message-ID: <20260725150852.859188-2-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260725150852.859188-1-ekffu200098@gmail.com>

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 <ekffu200098@gmail.com>
---
 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);
 }
 
 /**
-- 
2.43.0


  reply	other threads:[~2026-07-25 15:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25 15:08 [PATCH net-next v2 0/4] net: remove conditional returns with no effect Sang-Heon Jeon
2026-07-25 15:08 ` [Intel-wired-lan] " Sang-Heon Jeon
2026-07-25 15:08 ` Sang-Heon Jeon [this message]
2026-07-27  9:57   ` [PATCH net-next v2 1/4] dpll: zl3073x: remove conditional return " Ivan Vecera
2026-07-25 15:08 ` [PATCH net-next v2 2/4] net: ethernet: " Sang-Heon Jeon
2026-07-27 11:27   ` Ioana Ciornei
2026-07-25 15:08 ` [PATCH net-next v2 3/4] net: " Sang-Heon Jeon
2026-07-25 15:08 ` [Intel-wired-lan] [PATCH net-next v2 4/4] net: intel: " Sang-Heon Jeon
2026-07-25 15:08   ` Sang-Heon Jeon
2026-07-27  9:45   ` [Intel-wired-lan] " Marcin Szycik
2026-07-30 11:10 ` [PATCH net-next v2 0/4] net: remove conditional returns " patchwork-bot+netdevbpf
2026-07-30 11:10   ` [Intel-wired-lan] " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260725150852.859188-2-ekffu200098@gmail.com \
    --to=ekffu200098@gmail.com \
    --cc=Prathosh.Satish@microchip.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.