[lvc-project] [PATCH] idt77252: remove check of idt77252_init_ubr() return value

Alexandra Diupina adiupina at astralinux.ru
Mon Aug 28 17:36:46 MSK 2023


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




More information about the lvc-project mailing list