netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] idt77252: remove check of idt77252_init_ubr() return value
@ 2023-08-28 14:36 Alexandra Diupina
  2023-08-28 19:40 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandra Diupina @ 2023-08-28 14:36 UTC (permalink / raw)
  To: Chas Williams
  Cc: Alexandra Diupina, linux-atm-general, netdev, linux-kernel,
	lvc-project

idt77252_init_ubr() always returns 0, so it is possible
to remove check of its return value

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 2dde18cd1d8f ("Linux 6.5")
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
---
 drivers/atm/idt77252.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index e327a0229dc1..2c8e0e6cf4b9 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -2296,13 +2296,7 @@ idt77252_init_tx(struct idt77252_dev *card, struct vc_map *vc,
 			break;
 
 		case SCHED_UBR:
-			error = idt77252_init_ubr(card, vc, vcc, qos);
-			if (error) {
-				card->scd2vc[vc->scd_index] = NULL;
-				free_scq(card, vc->scq);
-				return error;
-			}
-
+			idt77252_init_ubr(card, vc, vcc, qos);
 			set_bit(VCF_IDLE, &vc->flags);
 			break;
 	}
@@ -2586,9 +2580,7 @@ idt77252_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags)
 				break;
 
 			case ATM_UBR:
-				error = idt77252_init_ubr(card, vc, vcc, qos);
-				if (error)
-					goto out;
+				idt77252_init_ubr(card, vc, vcc, qos);
 
 				if (!test_bit(VCF_IDLE, &vc->flags)) {
 					writel(TCMDQ_LACR | (vc->lacr << 16) |
-- 
2.30.2


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

* Re: [PATCH] idt77252: remove check of idt77252_init_ubr() return value
  2023-08-28 14:36 [PATCH] idt77252: remove check of idt77252_init_ubr() return value Alexandra Diupina
@ 2023-08-28 19:40 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2023-08-28 19:40 UTC (permalink / raw)
  To: Alexandra Diupina
  Cc: Chas Williams, linux-atm-general, netdev, linux-kernel,
	lvc-project

On Mon, 28 Aug 2023 17:36:46 +0300 Alexandra Diupina wrote:
> idt77252_init_ubr() always returns 0, so it is possible
> to remove check of its return value
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 2dde18cd1d8f ("Linux 6.5")

How is this a fix and if it was how could the release tag possibly have
caused the issue?

I think this is pointless churn, unless the error handling is buggy
in itself you should leave this code be.
-- 
pw-bot: reject

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

end of thread, other threads:[~2023-08-28 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 14:36 [PATCH] idt77252: remove check of idt77252_init_ubr() return value Alexandra Diupina
2023-08-28 19:40 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).