diff mbox series

idt77252: remove check of idt77252_init_ubr() return value

Message ID 20230828143646.8835-1-adiupina@astralinux.ru (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series idt77252: remove check of idt77252_init_ubr() return value | 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/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: 1357 this patch: 1357
netdev/cc_maintainers success CCed 3 of 3 maintainers
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
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 fail Problems with Fixes tag: 1
netdev/build_allmodconfig_warn success Errors and warnings before: 1380 this patch: 1380
netdev/checkpatch warning WARNING: Unknown commit id '2dde18cd1d8f', maybe rebased or not pulled?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Alexandra Diupina Aug. 28, 2023, 2:36 p.m. UTC
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(-)

Comments

Jakub Kicinski Aug. 28, 2023, 7:40 p.m. UTC | #1
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.
diff mbox series

Patch

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) |