From patchwork Mon Aug 28 14:36:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 13368036 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FA2C46AB for ; Mon, 28 Aug 2023 14:37:19 +0000 (UTC) Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC908CC; Mon, 28 Aug 2023 07:37:17 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 9882B1868CFF; Mon, 28 Aug 2023 17:37:14 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id UxFglozsGboL; Mon, 28 Aug 2023 17:37:14 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 46D921868ACA; Mon, 28 Aug 2023 17:37:14 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XGCoCzZOAfKh; Mon, 28 Aug 2023 17:37:14 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.233.169]) by mail.astralinux.ru (Postfix) with ESMTPSA id 8A3051868CE4; Mon, 28 Aug 2023 17:37:13 +0300 (MSK) From: Alexandra Diupina To: Chas Williams <3chas3@gmail.com> Cc: Alexandra Diupina , linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] idt77252: remove check of idt77252_init_ubr() return value Date: Mon, 28 Aug 2023 17:36:46 +0300 Message-Id: <20230828143646.8835-1-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- 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) |