All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qlge: replace goto
@ 2021-12-27  7:55 Adam Kandur
  2021-12-27  9:22 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Kandur @ 2021-12-27  7:55 UTC (permalink / raw)
  To: linux-staging

I think this goto can be easily replaced. Hope, this is right.

---
 drivers/staging/qlge/qlge_mpi.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/qlge/qlge_mpi.c b/drivers/staging/qlge/qlge_mpi.c
index 96a4de6d2b34..b739dd051c87 100644
--- a/drivers/staging/qlge/qlge_mpi.c
+++ b/drivers/staging/qlge/qlge_mpi.c
@@ -1122,7 +1122,8 @@ void qlge_mpi_port_cfg_work(struct work_struct *work)
        if (status) {
                netif_err(qdev, drv, qdev->ndev,
                          "Bug: Failed to get port config data.\n");
-               goto err;
+               clear_bit(QL_PORT_CFG, &qdev->flags);
+               return;
        }

        if (qdev->link_config & CFG_JUMBO_FRAME_SIZE &&
@@ -1135,14 +1136,9 @@ void qlge_mpi_port_cfg_work(struct work_struct *work)
        if (status) {
                netif_err(qdev, drv, qdev->ndev,
                          "Bug: Failed to set port config data.\n");
-               goto err;
+               qlge_queue_fw_error(qdev);
+               goto end;
        }
-end:
-       clear_bit(QL_PORT_CFG, &qdev->flags);
-       return;
-err:
-       qlge_queue_fw_error(qdev);
-       goto end;
 }

 /* Process an inter-device request.  This is issues by
-- 
2.34.0

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

end of thread, other threads:[~2021-12-27  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-27  7:55 [PATCH] qlge: replace goto Adam Kandur
2021-12-27  9:22 ` Greg KH

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.