diff options
author | 2020-04-29 21:33:56 -0400 | |
---|---|---|
committer | 2020-05-05 12:20:40 +0200 | |
commit | faeea64fb9748002ed2aecff6e5caa01cc829735 (patch) | |
tree | 87c8c8bce32b4bacfa27dfcf1fb94dadd5613561 /drivers/staging/qlge | |
parent | staging: qlge: Fix indentation in ql_get_mac_addr_reg (diff) | |
download | linux-faeea64fb9748002ed2aecff6e5caa01cc829735.tar.gz linux-faeea64fb9748002ed2aecff6e5caa01cc829735.tar.bz2 linux-faeea64fb9748002ed2aecff6e5caa01cc829735.zip |
staging: qlge: Remove goto statements from ql_get_mac_addr_reg
Similar to ql_set_mac_addr_reg, ql_get_mac_addr_reg also has several
goto statements that can be trivially replaced with a break statement.
Signed-off-by: Rylan Dmello <mail@rylan.coffee>
Link: https://lore.kernel.org/r/9339ea49c4f943411adae3b9b5b278ae8bf062e1.1588209862.git.mail@rylan.coffee
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r-- | drivers/staging/qlge/qlge_main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 844c2c6df38d..bb6c198a0130 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -265,7 +265,7 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, case MAC_ADDR_TYPE_CAM_MAC: { status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); if (status) - goto exit; + break; ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ (index << MAC_ADDR_IDX_SHIFT) | /* index */ @@ -273,11 +273,11 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, type); /* type */ status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); if (status) - goto exit; + break; *value++ = ql_read32(qdev, MAC_ADDR_DATA); status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); if (status) - goto exit; + break; ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ (index << MAC_ADDR_IDX_SHIFT) | /* index */ @@ -285,13 +285,13 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, type); /* type */ status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); if (status) - goto exit; + break; *value++ = ql_read32(qdev, MAC_ADDR_DATA); if (type == MAC_ADDR_TYPE_CAM_MAC) { status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); if (status) - goto exit; + break; ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */ (index @@ -301,7 +301,7 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0); if (status) - goto exit; + break; *value++ = ql_read32(qdev, MAC_ADDR_DATA); } break; @@ -313,7 +313,6 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index, "Address type %d not yet supported.\n", type); status = -EPERM; } -exit: return status; } |