[PATCH] qlge: replace goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux